Bug report
Summary
ktlint_code_style gets unconditionally overridden to its default value (intellij_idea) when the editorConfigOverride map is non-empty but does not define it. As a result, it gets overridden even if it's actually
defined in the .editorconfig file.
For example, the following set up will result in ktlint_code_style being set to intellij_idea, although you would expect it to be set to ktlint_official as defined in .editorconfig:
ktlint_code_style = ktlint_official
# other properties
# ...
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.6.21'
id 'com.diffplug.spotless'
}
repositories { mavenCentral() }
spotless {
kotlin {
ktlint().editorConfigOverride([
ktlint_test_key: true,
])
}
}
Additional info
- Gradle version: 8.0.2
- Spotless version: 6.25.0
- Operating system: macOS Sonoma 14.5
Bug report
Summary
ktlint_code_stylegets unconditionally overridden to its default value (intellij_idea) when theeditorConfigOverridemap is non-empty but does not define it. As a result, it gets overridden even if it's actuallydefined in the
.editorconfigfile.For example, the following set up will result in
ktlint_code_stylebeing set tointellij_idea, although you would expect it to be set toktlint_officialas defined in.editorconfig:.editorconfig:build.gradleAdditional info