How to disable a specific rule with new version?
dessalines opened this issue · comments
I updated kotlinter, but there are no instructions for how to disable specific lints.
This is covered in ktlint's configuration guide here: https://pinterest.github.io/ktlint/0.49.1/rules/configuration-ktlint/#disabled-rules
That doesn't show how I add any of those rules to kotlinter. In the gradle config block somehow?
You put them in the .editorconfig file.
Support of properties disabled_rules and ktlint_disabled_rules has been removed in KtLint 0.49.
I tried that, but couldn't get any of them to work with kotlinter
As shown in their documentation syntax like the following will work
ktlint_standard_final-newline = disabled
There is a bug where sometimes we cache and don't immediately see an .editorconfig change (#327) so you may wish to gradle --stop
after your edit just to be sure.
Thanks! This worked in my .editorconfig
[*.{kt,kts}]
ktlint_standard_no-wildcard-imports = disabled