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
Style/RedundantParentheses multiline list detection problem #10883
Labels
Comments
This was added purposely in #2874, possibly due to a parser issue. There's even a test for it: rubocop/spec/rubocop/cop/style/redundant_parentheses_spec.rb Lines 223 to 230 in c704955
|
We might be able to handle this now, I'm looking at it. |
Hi @vlad-pisanov, your two issues are both handled in my PR now. Thanks for the report! |
dvandersluis
added a commit
to dvandersluis/rubocop
that referenced
this issue
Aug 9, 2022
…tect offenses and properly correct when the end parentheses and comma are on their own line.
koic
added a commit
that referenced
this issue
Aug 9, 2022
[Fix #10883] Fix `Style/RedundantParentheses` to be able to detect offenses and properly correct when the end parentheses and comma are on their own line
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider
Style/RedundantParentheses
doesn't detect a problem in this example. If we take out the second list element, the cop triggers:Expected behavior
Both examples should trigger
Style/RedundantParentheses
RuboCop version
The text was updated successfully, but these errors were encountered: