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

Do not count explicit block argument for Metrics/ParameterLists #10186

Closed
singpolyma opened this issue Oct 14, 2021 · 1 comment · Fixed by #10188
Closed

Do not count explicit block argument for Metrics/ParameterLists #10186

singpolyma opened this issue Oct 14, 2021 · 1 comment · Fixed by #10188

Comments

@singpolyma
Copy link

Is your feature request related to a problem? Please describe.

A block capture is not really another argument, and having the parameter list be too long vs not based on switching between yield and explicit block feels inconsistent.

Describe the solution you'd like

Metrics/ParameterLists should not count explicit block argument.

Describe alternatives you've considered

Could offer it as an option instead of changing the behaviour.

koic added a commit to koic/rubocop that referenced this issue Oct 14, 2021
…rameterLists`

Fixes rubocop#10186.

Explicit block arg `&block` is not counted by default to prevent
erroneous change that is avoided by making block arg implicit.
@koic
Copy link
Member

koic commented Oct 14, 2021

This makes sense to me. I've opened #10188.

bbatsov pushed a commit that referenced this issue Oct 19, 2021
…Lists`

Fixes #10186.

Explicit block arg `&block` is not counted by default to prevent
erroneous change that is avoided by making block arg implicit.
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