Skip to content
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 comma autocorrect bug #10882

Closed
vlad-pisanov opened this issue Aug 8, 2022 · 1 comment
Closed

Style/RedundantParentheses comma autocorrect bug #10882

vlad-pisanov opened this issue Aug 8, 2022 · 1 comment
Labels

Comments

@vlad-pisanov
Copy link

Consider

foo(
  (
    1
  ),
  2
)

Style/RedundantParentheses autocorrects this to the non-parsable:

foo(

    1
  ,
  2
)

Presumably, the comma should be carried up to the previous line:

foo(

    1,
  2
)

RuboCop version

1.33.0 (using Parser 3.1.2.0, rubocop-ast 1.19.1, running on ruby 2.6.9 x86_64-darwin21)
  - rubocop-minitest 0.21.0
  - rubocop-performance 1.14.3
  - rubocop-rails 2.15.2
@koic koic added the bug label Aug 8, 2022
@dvandersluis
Copy link
Member

I'm going to close this as a duplicate of #10883 because it's the same fix.

@dvandersluis dvandersluis closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants