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

Long lambdas should have a parameter name instead of it #695

Closed
petertrr opened this issue Jan 12, 2021 · 0 comments · Fixed by #705
Closed

Long lambdas should have a parameter name instead of it #695

petertrr opened this issue Jan 12, 2021 · 0 comments · Fixed by #705
Assignees

Comments

@petertrr
Copy link
Member

petertrr commented Jan 12, 2021

  • Count number of lines in lambda
  • If it's more than maximum, suggest to replace it with explicit parameter name
  • Make maximum size configurable
  • Describe it in code style guide in chapter 5

Invalid code:

list.map {
    // over 9000 LOC
}

Valid code:

list.map { element ->
    // over 9000 LOC
}
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