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
When run on this code:
netmask = (~IPAddr.new(address).mask(0)).mask(prefix)
rubocop reports:
cookbooks/networking/recipes/default.rb:38:56: C: Don't use parentheses around a method call.
and corrects it to:
netmask = ~IPAddr.new(address).mask(0).mask(prefix)
but removing the parentheses means than the ~ is applied after the call to the mask method instead of before it.
~
mask
This is a change between 0.34.2 and 0.36.0 as the earlier version didn't complain about this code.
The text was updated successfully, but these errors were encountered:
Seems we failed to account for unary ops in this cop.
Sorry, something went wrong.
Ouch, I'll take care of this.
5412c48
Merge pull request #2656 from lumeet/fix_unary_redundant_parens
ac236f6
[Fix #2654] Fix unary in RedundantParentheses
No branches or pull requests
When run on this code:
rubocop reports:
and corrects it to:
but removing the parentheses means than the
~
is applied after the call to themask
method instead of before it.This is a change between 0.34.2 and 0.36.0 as the earlier version didn't complain about this code.
The text was updated successfully, but these errors were encountered: