pinterest / ktlint

An anti-bikeshedding Kotlin linter with built-in formatter
https://pinterest.github.io/ktlint/
MIT License
6.15k stars 503 forks source link

ktlint_standard_enum-entry-name-case = disabled does not work on .editorconfig #2189

Closed daniel-lopes-optimizely closed 1 year ago

daniel-lopes-optimizely commented 1 year ago

The .editorconfig file

[*.{kt,kts}]
indent_style = space
indent_size = 4
ktlint_standard_enum-entry-name-case = disabled # doesnt work
ktlint_standard_no-wildcard-imports = disabled
ktlint_standard_filename = disabled

The error:

Error on line: 209, column: 4
rule: standard:enum-entry-name-case
Enum entry name should be uppercase underscore-separated names like "ENUM_ENTRY" or upper camel-case like "EnumEntry"

Is this something you can help me figure out? I'm using the spotless gradle plugin, but I think this is related to ktlin. Let me know if I have to take this to the spotless devs instead.

paul-dingemans commented 1 year ago

Most likely this is a problem with ktlint integration in Spotless. Are you sure it works for the other disabled rules?

Also, you can validate using Ktlint CLI whether the problem is caused by Ktlint.