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 auto-correcting a redundant parenthesis inside an array with assignments in it, the resulting code is invalid Ruby. e.g. consider:
[ x = ( 1 ), y = 2 ]
Produces the invalid syntax:
[ x = 1 , y = 2 ]
Should either be marked unsafe, or autocorrect to:
[ x = 1, y = 2 ]
Auto-correct code above with Style/RedundantParenteses
Style/RedundantParenteses
1.12.1 (using Parser 3.0.1.0, rubocop-ast 1.4.1, running on ruby 2.6.5 x86_64-darwin19)
The text was updated successfully, but these errors were encountered:
[Fix rubocop#9689] Treat parens around array items the same for child…
c5fd6ed
…ren and deeper descendants.
[Fix #9689] Treat parens around array items the same for children and…
c53803b
… deeper descendants.
dvandersluis
Successfully merging a pull request may close this issue.
When auto-correcting a redundant parenthesis inside an array with assignments in it, the resulting code is invalid Ruby. e.g. consider:
Produces the invalid syntax:
Expected behavior
Should either be marked unsafe, or autocorrect to:
Steps to reproduce the problem
Auto-correct code above with
Style/RedundantParenteses
RuboCop version
The text was updated successfully, but these errors were encountered: