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

False negative for Style/ArgumentsForwarding and super #12919

Closed
Earlopain opened this issue May 21, 2024 · 0 comments · Fixed by #12921
Closed

False negative for Style/ArgumentsForwarding and super #12919

Earlopain opened this issue May 21, 2024 · 0 comments · Fixed by #12921
Labels

Comments

@Earlopain
Copy link
Contributor

Expected behavior

Offense for the following:

def foo(*args)
  super(*args, bar: "baz")
end

# Autocorrect:

def foo(*)
  super(*, bar: "baz")
end

The same also applies to kwargs and blocks, if the Ruvy version supports that syntax.

Actual behavior

It only considers send nodes.

Steps to reproduce the problem

RuboCop version

$ [bundle exec] rubocop -V
1.63.5 (using Parser 3.3.0.5, rubocop-ast 1.31.2, running on ruby 3.3.1) [x86_64-linux]
  - rubocop-performance 1.21.0
  - rubocop-rake 0.6.0
  - rubocop-rspec 2.29.1
@koic koic added the bug label May 22, 2024
koic added a commit to koic/rubocop that referenced this issue May 22, 2024
Fixes rubocop#12919.

This PR fixes false negatives for `Style/ArgumentsForwarding`
when forward target is `super`.
bbatsov pushed a commit that referenced this issue May 22, 2024
Fixes #12919.

This PR fixes false negatives for `Style/ArgumentsForwarding`
when forward target is `super`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants