In case a file only contains lint violations which are suppressed using the baseline, then ktlint 1.3.0 keeps reporting that format was not able to resolve all violations which (theoretically) can be autocorrected.
Run command rm baseline.xml && ktlint **/Foo.kt --baseline=baseline.xml to delete the existing baseline.xml and recreate a new baseline.xml file. The created baseline.xml file looks like:
11:00:10.368 [pool-1-thread-1] WARN com.pinterest.ktlint.rule.engine.internal.CodeFormatter -- Format was not able to resolve all violations which (theoretically) can be autocorrected in file /###/src/main/kotlin/Foo.kt in 3 consecutive runs of format.
In case a file only contains lint violations which are suppressed using the baseline, then ktlint
1.3.0
keeps reporting that format was not able to resolve all violations which (theoretically) can be autocorrected.Assume that the file
Foo.kt
contains code below:and
.editorconfig
:Run command
rm baseline.xml && ktlint **/Foo.kt --baseline=baseline.xml
to delete the existingbaseline.xml
and recreate a newbaseline.xml
file. The createdbaseline.xml
file looks like:Running
ktlint-dev **/Foo.kt --baseline=baseline.xml -F --relative
results in: