-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Lint/EmptyConditionalBody
does not allow commented empty body in 2nd elsif
#11820
Comments
I think the reason for this bug is that the parent of the second rubocop/lib/rubocop/cop/mixin/comments_help.rb Lines 18 to 23 in b246658
rubocop/lib/rubocop/cop/mixin/comments_help.rb Lines 62 to 78 in b246658
|
[Fix #11820] Fix `Lint/EmptyConditionalBody` false-positives for commented empty `elsif` body
Expected behavior
In
Lint/EmptyConditionalBody
, whenAllowComments: true
, no offense should be detected from the following code:Actual behavior
Lint/EmptyConditionalBody
detects an offense like this:Steps to reproduce the problem
This behavior can be reproduced by applying the following patch:
RuboCop version
The text was updated successfully, but these errors were encountered: