You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ran in to a situation in our codebase where Layout/SpaceBeforeFirstArg wasn't reporting a line that should have been reported. After some debugging this seems to be a problem with the aligned_with_something? method thinking that 2 unrelated lines are aligned.
Changing the file so that 'asdf' does not align with option: true causes the offense to then be reported.
$ cat foo.rb
foo = Foo.new(arg, option: true)
foo.long_method_12'asdf'
$ rubocop --only Layout/SpaceBeforeFirstArg foo.rb
Inspecting 1 file
C
Offenses:
foo.rb:2:19: C: Layout/SpaceBeforeFirstArg: Put one space between the method name and the first argument.
foo.long_method_12'asdf'
1 file inspected, 1 offense detected
Ran in to a situation in our codebase where
Layout/SpaceBeforeFirstArg
wasn't reporting a line that should have been reported. After some debugging this seems to be a problem with thealigned_with_something?
method thinking that 2 unrelated lines are aligned.Expected behavior
Expected to receive an offense.
Actual behavior
Received no offense.
Steps to reproduce the problem
Changing the file so that
'asdf'
does not align withoption: true
causes the offense to then be reported.RuboCop version
The text was updated successfully, but these errors were encountered: