-
Notifications
You must be signed in to change notification settings - Fork 510
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
Enforce multiline lambda parameters to be on the first line #2121
Comments
Code above is not accepted by
which indeed deviates from the kotlin coding conventions. The idea behind this deviation is that code sample like below:
are nicely formatted as:
which is more consist with indentation of parameters in a function call:
Note that with code style
to
|
I have misread the original post and focused too much on the indentation only. The original post identifies that code:
should be formatted as:
to comply with:
For this a new rule is needed. This rule should also take care of:
|
The Kotlin Coding conventions are not entirely comsistent regard indenting of a multiline parameter list. https://kotlinlang.org/docs/coding-conventions.html#lambdas
https://kotlinlang.org/docs/coding-conventions.html#parameters-in-lambdas
|
This rule enforces the parameter list of a function literal to be formatted consistently Closes #2121
This rule enforces the parameter list of a function literal to be formatted consistently Closes #2121
Thanks for a rapid fix! |
Expected Rule behavior
Currently it is possible to have lambdas to be formatted like following:
However this is incorrect behaviour according to Kotlin Code Conventions:
https://kotlinlang.org/docs/coding-conventions.html#lambdas
Additional information
The text was updated successfully, but these errors were encountered: