You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
.editorconfig:
ktlint_code_style = ktlint_official
# other properties
# ...
build.gradle
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
The text was updated successfully, but these errors were encountered:
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.
This change checks if ktlint_code_style is already defined in
.editorconfig before overriding it to its default value.
Fixesdiffplug#2142.
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.
This change checks if ktlint_code_style is already defined in
.editorconfig before overriding it to its default value.
Fixesdiffplug#2142.
Bug report
Summary
ktlint_code_style
gets unconditionally overridden to its default value (intellij_idea
) when theeditorConfigOverride
map is non-empty but does not define it. As a result, it gets overridden even if it's actuallydefined in the
.editorconfig
file.For example, the following set up will result in
ktlint_code_style
being set tointellij_idea
, although you would expect it to be set toktlint_official
as defined in.editorconfig
:.editorconfig
:build.gradle
Additional info
The text was updated successfully, but these errors were encountered: