xenomachina
12/13/2023, 9:02 PMktlint_standard_no-blank-line-in-list = disabled
in .editorconfig
, but ktlint is still complaining "Unexpected blank line(s) in value argument list".xenomachina
12/13/2023, 9:05 PM$ cat .editorconfig
ktlint_standard_no-blank-line-in-list = disabled
$ cat Foo.kt
val myMap =
mapOf(
// a comment about "foo"
"foo" to computeFoo(),
// a comment about "bar" and "baz"
"bar" to computeBar(),
"baz" to computeBaz(),
)
$ ktlint Foo.kt
/tmp/foo/Foo.kt:5:1: Unexpected blank line(s) in value argument list (standard:no-blank-line-in-list)
13:03:54.444 [main] WARN com.pinterest.ktlint.cli.internal.KtlintCommandLine - Lint has found errors than can be autocorrected using 'ktlint --format'
Summary error count (descending) by rule:
standard:no-blank-line-in-list: 1
xenomachina
12/13/2023, 9:06 PM$ ktlint -V
1.0.1
Paul Dingemans
12/14/2023, 5:51 PM.editorconfig
is not valid. Try:
root = true
[*.{kt,kts}]
ktlint_standard_no-blank-line-in-list = disabled
xenomachina
12/15/2023, 3:49 AMBenoît Liessens
12/17/2023, 10:32 AMroot = true
?Paul Dingemans
12/17/2023, 11:06 AM.editorconfig
file. Without this flag, ktlint might pick-up an .editorconfig
which is located in a parent directory outside your project. Also, with deep hierarchies it does not need to search all parent up to the root.