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
Regression: IfUnlessModifier and RedundantCopDisableDirective contradict #8576
Comments
FeepingCreature
changed the title
IfUnlessModifier and RedundantCopDisableDirective contradict
Regression: IfUnlessModifier and RedundantCopDisableDirective contradict
Aug 24, 2020
ping @dmytro-savochkin This may be related to your #8435 ? |
Yeah, it's related. Probably we should ignore comments that are |
dmytro-savochkin
pushed a commit
to dmytro-savochkin/rubocop
that referenced
this issue
Aug 24, 2020
… comment directives when considering conversion to modifier form
bbatsov
pushed a commit
that referenced
this issue
Sep 23, 2020
…t directives when considering conversion to modifier form
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce the problem
Consider this code:
rubocop.yml
:test.rb
:Actual behavior
When run with
0.89.1
andrubocop -c rubocop.yml test.rb
, rubocop claims "Unnecessary disabling of Style/IfUnlessModifier". However, if I remove the disable line, it says "Favor modifier if usage when having a single-line body."Expected behavior
Rubocop should stop trying to gaslight me about its warnings. :)
RuboCop version
0.89.1 (using Parser 2.7.1.4, rubocop-ast 0.3.0, running on ruby 2.5.1 x86_64-linux-gnu)
Further notes
The test works in
0.88.0
and fails in0.89.0
.The text was updated successfully, but these errors were encountered: