Rob Elliot
10/09/2023, 9:17 AMval fruit = listOf(
"apples",
"pears",
"oranges",
}
without adding
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_string-template-indent = disabled
I much prefer it to:
val fruit =
listOf(
"apples",
"pears",
"oranges",
}
Paul Dingemans
10/09/2023, 4:22 PMktlint_official
) there is no other way to achieve this. This code style has a stronger emphasis on code consistency.
You can fall back on the other code styles in which the multiline-expression rule is not enabled by default. But this will have other side effects as well.christophsturm
10/09/2023, 7:22 PMval context = describe(Suite::class) {
......// really long labmda
}
otherwise I lose a whole indentation level.Paul Dingemans
10/09/2023, 7:39 PMktlint_official
focuses on consistency, so no exception. Another reason is that everyone want different exceptions for their use case which they think is special. In the end, everything will be allowed again. The idea of wrapping the multiline expression is just that it happens everywhere. It might take some time to get used to it, but in the end the consistency pays off.