Paulius O
10/30/2021, 6:50 AMval myVal = (
a.size +
b.size +
c.size)
Is there a way to change klint settings to align it automatically? I would prefer all to be offset at the same level.
If there isn’t maybe someone can explain why indentation the way that it’s working now is better?Paulius O
10/30/2021, 6:51 AMVampire
10/30/2021, 9:29 AMPaulius O
10/30/2021, 9:40 AM./gradlew ktlintFormat
We are using the latest version -> 0.42.1
are Klint and Ktlint different things?Vampire
10/30/2021, 5:17 PMKlitos Kyriacou
11/01/2021, 9:11 AMVampire
11/01/2021, 6:01 PM= bar(
it formats with the closing parenthesis on a new line and only indented 4 spaces.
Might be a bug in the default Kotlin format settings in IntelliJ.Klitos Kyriacou
11/01/2021, 6:03 PMPaulius O
11/02/2021, 9:13 AMval myVal = (
a.size +
b.size +
c.size) == 1
but ignoring that, even without the comparison to another value and parentheses the indentation is still different:
val myVal =
a.size +
b.size +
c.size
and yes, one could say ” just put it on one line and be done with it!” - again the example is simplified and the real names are longer so one line is not enough.
If this is a potential bug, should I create a ticket?Vampire
11/02/2021, 11:34 AM