-
Notifications
You must be signed in to change notification settings - Fork 506
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
Unexpected newline before "{" for lambda expression assignments #409
Comments
Both the Google and Jetbrains styleguides say no linebreaks before opening curly braces so this is by-design. https://developer.android.com/kotlin/style-guide#braces |
I think this should be reopened If line is to long Android Studio will format below code and move
and ktlint complains |
In my opinion, for these one-off exceptions, it's better to use a ktlint-disable comment to suppress it rather than complicate the rule. But open to feedback from others. |
We should really prioritize this as this rule contradicts default AS formatting |
+1 I believe @igorwojda example with validDateRule is a good example 👍 |
Related - #637 |
Since version 0.32.0 lambda expression assignments like:
trigger a
Unexpected newline before "{"
.For the shown example, there is no need to have a line break after
=
, but if the first line is getting too long, a line break makes sense.Is this intended behavior?
The text was updated successfully, but these errors were encountered: