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

Request: Allow to add method arguments to Metrics/MethodLength CountAsOne #11070

Closed
hacktivista opened this issue Oct 12, 2022 · 2 comments · Fixed by #11228
Closed

Request: Allow to add method arguments to Metrics/MethodLength CountAsOne #11070

hacktivista opened this issue Oct 12, 2022 · 2 comments · Fixed by #11228

Comments

@hacktivista
Copy link

hacktivista commented Oct 12, 2022

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

I tend to write

method(
  param1, param2, param3
)

Instead of

method(
  param1,
  param2,
  param3
)

Which I think is clearer, just because I need to respect the method length limit.

Sometimes calling the method in one line isn't possible if I respect a 80 characters line width.

Describe the solution you'd like

I'd like to be able to specify that method calls can be counted as a single line. Something like:

Metrics/MethodLength:
  CountAsOne: ['arguments']
@hacktivista hacktivista changed the title Request: Allow to add method parameters to Metrics/MethodLength CountAsOne Request: Allow to add method arguments to Metrics/MethodLength CountAsOne Oct 12, 2022
@fatkodima
Copy link
Contributor

Makes sense to me.
@bbatsov what do you think on this change?

@bbatsov
Copy link
Collaborator

bbatsov commented Dec 2, 2022

Sounds reasonable.

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