jeremymailen / kotlinter-gradle

Painless, fast ktlint plugin for Gradle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Keep semicolons in enum classes

hantsy opened this issue · comments

I want to keep the ; in the enum class.

enum class Status{
    PENDING,
    COMPLETED;
}

Upgraded to the new 3.14.0, it removes ; in all files.

I tried to add ktlint_standard_no-semi = disabled in the .editorconfig file, it does not work.

I can't reproduce the issue. When I add

ktlint_standard_no-semi = disabled

I'm able to put a semicolon in an enum def without it triggering a lint error or format correcting it.
Can you reproduce this behavior with the ktlint cli version 0.48.2?
In any case, this behavior belongs to ktlint rather than the kotlinter gradle plugin.

As of 3.14.0 we should correctly clear cache when editorconfig changes, but in case you are still seeing this behavior, try gradle --stop first to ensure the gradle daemon is not caching some state.

Yeah, maybe Gradle cache caused the issue, today I tried it again, works.

Thanks @jeremymailen