-
-
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
FavorUnlessOverNegatedIf triggered when using elsifs #427
Comments
Shouldn't elsif be ignored altogether by this cop? There's no elsunless you can use in this case. |
I think so. The comment in the cop says it ignores if's with else statements. But it doesn't work for elsifs.. |
Internally the parser represents |
Thanks! What about the EndAlignment cop? |
This is intentional - most IDEs/editors align |
Your latest change breaks ternary operators: letme = crash ? :rubocop : ':(' =>
|
That is no longer my latest change - this is already fixed :-) |
👍 |
Here's an example:
which gives the following output:
How to fix this? I think it
FavorUnlessOverNegatedIf
shouldn't trigger in this case.I also think the
EndAlignment
shouldn't trigger either.The text was updated successfully, but these errors were encountered: