We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Autocorrect of Style/InverseMethods breaks double negatives for at least regexp checks as following.
!!(string =~ /^\w+$/)
!string !~ /^\w+$/
rubocop -a on files containing the given code
rubocop -a
$ rubocop -V 0.48.1 (using Parser 2.4.0.0, running on ruby 2.2.7 x86_64-darwin16)
The text was updated successfully, but these errors were encountered:
It seems like it should be easy enough to ignore double negation.
Sorry, something went wrong.
[Fix rubocop#4393] Prevent InverseMethods from registering an offense…
94369e3
… when double negation is used
[Fix #4393] Prevent InverseMethods from registering an offense when d…
f109b61
…ouble negation is used (#4409)
Successfully merging a pull request may close this issue.
Autocorrect of Style/InverseMethods breaks double negatives for at least regexp checks as following.
Given code
!!(string =~ /^\w+$/)
Expected behavior
!!(string =~ /^\w+$/)
Actual behavior
!string !~ /^\w+$/
Steps to reproduce the problem
rubocop -a
on files containing the given codeRuboCop version
The text was updated successfully, but these errors were encountered: