Hi! Is it possible to configure ktlint so that it ...
# ktlint
m
Hi! Is it possible to configure ktlint so that it only accepts one way of formatting the code? What i find frustrating is that you can format with ktlint, change the formatting manually, then run ktlint again, and it will accept both formattings. To leave no room for discussion/uneccesary changes in PRs such a feature would be really good.
b
If your are looking for a more strict formatter you can check ktfmt.
m
Thanks! What is the reason behind not having super strict rules? Wouldnt that be more «anti-bikeshedding»?
b
A strict formatter and intellij doesn't work that well together. I think that's one of the reasons. But I don't know the real reasons behind it.
m
Darfmt in intellij works flawlessly- after programming in dart for a while i really missed the formatter when going back to Kotlin. Thats why i asked here, but will test ktfmt!
s
@Mkohm could you file an issue on github? that sounds surprising but given the interaction between different rules it's possible that happens
m
Might be that i havent played around enough with the rules. Will create an issue next time i experience it 😊