Running the ktlint formatter removes the first blank line in the file (between enum class and the first comment), but it still fails the check with the same error.
Your Environment
Version of ktlint used: 1.1.1
Relevant parts of the .editorconfig settings: None
Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): https://github.com/JLLeitschuh/ktlint-gradle 12.1.0
Tnx for reporting. This is indeed a bug. It seems to be caused by the blank line between the two EOL-comments. Without that blank line no violation is reported.
Expected Behavior
There is a newline before every comment, so either this is a false positive, or it's giving the wrong error.
Observed Behavior
Sample.kt:1:36 Expected a newline before comment (standard:enum-wrapping)
Steps to Reproduce
Running the ktlint formatter removes the first blank line in the file (between
enum class
and the first comment), but it still fails the check with the same error.Your Environment
.editorconfig
settings: None