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

Cop idea: useless ruby2_keywords #10202

Closed
ojab opened this issue Oct 20, 2021 · 0 comments · Fixed by #10205
Closed

Cop idea: useless ruby2_keywords #10202

ojab opened this issue Oct 20, 2021 · 0 comments · Fixed by #10205
Assignees

Comments

@ojab
Copy link
Contributor

ojab commented Oct 20, 2021

If method doesn't have kwargs, ruby2_keywords is useless, but sometime is used due to overlook. Rubocop should warn about

def xxx(foo)
end
ruby2_keywords :xxx

and alike to reduce useless code amount.

@dvandersluis dvandersluis self-assigned this Oct 21, 2021
dvandersluis added a commit to dvandersluis/rubocop that referenced this issue Nov 3, 2021
dvandersluis added a commit that referenced this issue Nov 9, 2021
[Fix #10202] Add new `Lint/Ruby2Keywords` cop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants