https://kotlinlang.org logo
#ktlint
Title
# ktlint
l

Lukas Anda

10/13/2023, 4:15 PM
Hey guys, do you perhaps have some good ktlint styles that can be used for compose multiplatform with traling commas?
p

p-schneider

10/13/2023, 4:37 PM
I'm currently waiting for klint 1.0.1 to be published om mavencentral, but 1.0.0 would already apply the trailing commas rule per default. Version 1.0.1 (released today) would bring a "fix" for the "FunctionNaming" of Composables. Additionally today I also added https://github.com/mrmans0n/compose-rules#readme because I saw it being mentioned in the ktlint 1.0.1 documentation at https://pinterest.github.io/ktlint/1.0.1/rules/standard/#function-naming
If i see that correctly the ktlint-gradle would use ktlint 0.47.1 if not specified otherwise. https://github.com/JLLeitschuh/ktlint-gradle/blob/v11.6.1/plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/KtlintExtension.kt#L39 I do have the Line
kotlin.code.style=official
in gradle.properties, I think that also affects ktlint.
l

Lukas Anda

10/15/2023, 3:41 PM
Thanks I’ll try that out
5 Views