features/support/env.rb
Space missing after comma. Open
Open
LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
- Read upRead up
- Exclude checks
Checks for comma (,) not followed by some kind of space.
Example:
# bad
[1,2]
{ foo:bar,}
# good
[1, 2]
{ foo:bar, }
Space missing after comma. Open
Open
LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
- Read upRead up
- Exclude checks
Checks for comma (,) not followed by some kind of space.
Example:
# bad
[1,2]
{ foo:bar,}
# good
[1, 2]
{ foo:bar, }
Space missing after comma. Open
Open
LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
- Read upRead up
- Exclude checks
Checks for comma (,) not followed by some kind of space.
Example:
# bad
[1,2]
{ foo:bar,}
# good
[1, 2]
{ foo:bar, }
Use __dir__
to get an absolute path to the current file's directory. Open
Open
LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
- Read upRead up
- Exclude checks
This cop checks for places where the #__dir__
method can replace more
complex constructs to retrieve a canonicalized absolute path to the
current file.
Example:
# bad
path = File.expand_path(File.dirname(__FILE__))
# bad
path = File.dirname(File.realpath(__FILE__))
# good
path = __dir__