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

Lint/UnusedMethodArgument autocorrect renames unused keywords #1177

Closed
anthonybishopric opened this issue Jun 25, 2014 · 1 comment · Fixed by #1180
Closed

Lint/UnusedMethodArgument autocorrect renames unused keywords #1177

anthonybishopric opened this issue Jun 25, 2014 · 1 comment · Fixed by #1180
Assignees

Comments

@anthonybishopric
Copy link

Running rubocop -a on a file containing

def foo(a: 1, b: 2)

where b is unused with rename b to _b. This is fine for ordinal'd arguments, but keyword arguments may be passed by clients, resulting in ArgumentError: unknown keyword: b. Keyword arguments should never be renamed by the auto corrector

@yujinakayama
Copy link
Collaborator

Thank for the report. I'll take a look.

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.

2 participants