Hello ! Sorry if this question has already been as...
# ktlint
y
Hello ! Sorry if this question has already been asked, I’ve look into the issue but the only match was one from 2019. Is there rules to prevent space before colon ? Something like this:
class MyClass(): MyInterface
I’ve tried using in my .editorconfig
Copy code
ij_editorconfig_space_before_colon = false
ij_editorconfig_space_after_colon = true
To use ktlint I’ve configured spotless, when doing
./gradlew app:spotlessApply
the rules above don’t apply
v
As the Kotlin code conventions require a space in that place and afair
ktlint
is designed to follow it and prevent bike-shedding, I doubt there is a setting to control this other than disabling the
colon-spacing
rule.
y
Oh you’re right, https://kotlinlang.org/docs/coding-conventions.html#colon I’ve misread and though the before colon was also on type-supertype