How do I deactivate rules? I get a lot of false po...
# ktlint
h
How do I deactivate rules? I get a lot of false positives and therefore want to exlude some rules. I created a file named
.editorconfig
in the top level of my project with the contents
Copy code
# Don't autoformat this file, IntelliJ adds forbidden spaces
root=true

[*.{kt,kts}]
disabled_rules=indent,max-line-length
insert_final_newline=true
But indent and max line length is still checked.
t
Are you using it via CLI or some build system plugin?
h
I am using the ktlint gradle plugin https://github.com/JLLeitschuh/ktlint-gradle
Ah I found a setting I can use with that plugin:
disabledRules.set(setOf("final-newline"))
but still, I wonder why the editorconfig file isnt applied. Is it only relevant for the cli tool?
t
mm, I need to check it loading
685 Views