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/RedundantDoubleSplatHashBraces autocorrect wrong on extra keyword arguments splat #505

Open
dorianmariecom opened this issue Jan 4, 2023 · 4 comments · Fixed by rubocop/rubocop#11392

Comments

@dorianmariecom
Copy link

Source:

def t(key, **options)
  I18n.t(key, **{scope: "project", **options})
end

Expected:

def t(key, **options)
  I18n.t(key, scope: "project", **options)
end

Actual:

def t(key, **options)
  I18n.t(key, scope: "project")
end
@searls
Copy link
Contributor

searls commented Jan 4, 2023

Thanks for submitting this, Dorian. Did this start occurring in a specific recent release?

koic added a commit to koic/rubocop that referenced this issue Jan 5, 2023
Fixes standardrb/standard#505.

This PR fixes an incorrect autocorrect for `Style/RedundantDoubleSplatHashBraces`
using double splat in double splat hash braces.
@koic
Copy link
Contributor

koic commented Jan 5, 2023

This issue is a RuboCop' bug and I've opened rubocop/rubocop#11392.

@dorianmariecom
Copy link
Author

Thanks @searls and @koic I should have specified the version

@koic
Copy link
Contributor

koic commented Jan 17, 2023

FYI, this issue has been resolved in RuboCop 1.43.0. Note the Style/RedundantDoubleSplatHashBrances cop still has rubocop/rubocop#11447 different issue that will be resolved in the next RuboCop 1.44.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants