-
-
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
Bad autocorrect for Style/CaseLikeIf #8508
Comments
This cop wasn't marked as @fatkodima would you like to handle this? |
Can't reproduce.
|
Here is the "real" code where autocorrect went wrong for me: sul-dlss/dor-services-app@1a289b1#diff-c03d1fa455324b14d721e59ca497ab9eL27-L35 |
So it appears that it might have something to do with when it detects things are a class or a constant. For example, this will trigger it:
This does not trigger it:
and it doesn't seem to care that things in elsif clauses are class-like. |
Thanks for the report. Should be fixed by #8511 |
In rubocop 0.89.0
If you have code like this:
It incorrectly gets autocorrected to:
@marcandre warned about this here #7736 (comment) but I think this advice went unheeded.
The text was updated successfully, but these errors were encountered: