ktlint
ktlint copied to clipboard
--stdin no longer respects .editorconfig
0.47(.1) seems to have broken .editorconfig support when using --stdin
class Foo {
fun foo() {}
}
[*.kt]
indent_size = 2
With 0.47.1, the .editorconfig file is not honored. It doesn't matter whether it's specified explicitly or not
> cat code.kt | ktlint-0.47.1 --stdin --editorconfig=.editorconfig
8:54:57.762 [main] INFO com.pinterest.ktlint.internal.KtlintCommandLine - Enable default patterns [**/*.kt, **/*.kts]
<stdin>:2:1: Unexpected indentation (0) (should be 4) (indent)
0.46.1 Works as expected:
> cat code.kt | ktlint-0.46.1 --stdin --editorconfig=.editorconfig
<stdin>:2:1: Unexpected indentation (0) (should be 2) (indent)
You're right. This has gone wrong in 0.47.x.