-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rubocop reports false positives. #2912
Comments
Rubocop 0.16.0?? That is more than 2 years old. The latest version is 0.37.2. The problem doesn't occur on |
Weird. Something must have messed up the rubocop version in the paste!
Problem remains. |
Can't repro with posted code snippet. Can you post (or link to) a file which can be used to reproduce? |
Sure. This is the file tripping up the cop. |
Hmm. Just ran RC |
That is so weird. I just nuked the complete rbenv install for the ruby version used by this project, completely uninstalled rubocop from my system, reinstalled the needed ruby version and ran
Just to make sure:
Above issue remains. I have no clue where to go from here. |
I tried again with rubocop from
Same deal. Problem remains. |
Anyone here running OS X who can try inspecting this file? |
I've been able to reproduce. The key is to configure Style/ExtraSpacing:
ForceEqualSignAlignment: true |
I've been troubleshooting this thanks to @jonas054 reproduction step, found the issue, and created a fix for it. Now, I'm still faced with the more important task of figuring out why the tests are passing even with the old code. 😕 |
We should check whether a line is aligned with the following line if the preceding line is not an assignment statement. This fixes rubocop#2912
We should check whether a line is aligned with the following line if the preceding line is not an assignment statement. This fixes rubocop#2912
Expected behavior
rubocop should not report any errors.
Actual behavior
rubocop reports errors, which do not exist, even after running
rubocop -a
Steps to reproduce the problem
As you can see, the same errors are reported, even after rubocop claims to have fixed them.
Here's a snippet of the first offense reported by rubocop:
As you can see, the alignments are properly aligned.
RuboCop version
Include the output of
rubocop -V
:The text was updated successfully, but these errors were encountered: