Closed hantsy closed 1 year ago
This got me too the first time, but see here.
The value to use is disabled
rather that false.
@jeremymailen Which one use disabled
, the example config in the doc https://pinterest.github.io/ktlint/rules/configuration-ktlint/#trailing-comma-on-call-site uses a false
there.
Thanks @jeremymailen
[*.{kt,kts}]
ktlint_code_style=official
ij_kotlin_allow_trailing_comma_on_call_site=false
ktlint_standard_trailing-comma-on-call-site=disabled
ij_kotlin_allow_trailing_comma=false
ktlint_standard_trailing-comma-on-declaration-site=disabled
It works.
Another format I can not find in Ktlint config. I want to keep the ;
in the enum class, I've created a new issue to describe it, https://github.com/jeremymailen/kotlinter-gradle/issues/319
Upgraded to the latest version 3.14.0, when formatting the codes, it adds the
trailing comma
back by default.I have tried to add the following .editorconfig according to the Ktlint docs, it does not work(all data classes, fun parameters still add commas).