nbadal / ktlint-intellij-plugin

Ktlint plugin for IntelliJ IDEA + Android Studio
MIT License
150 stars 22 forks source link

Configure severity #539

Closed tonfido closed 6 days ago

tonfido commented 2 weeks ago

Thank you very much for the plugin.

I configured my IDE in a way, that every warning is yellow on a dark background. With ktlint, style violations are threaded as warning and therefore my IDE is all yellow while typing.

I'd like to change the severity, so I can adjust how the errors are visual presented. Is there any option already available to do so? For e.g. eslint, I could change the inspection profile and assign a severity.

image

Would be nice, if the ktlint violations would appear similar to the eslint inspections in the inspection settings.

paul-dingemans commented 2 weeks ago

No, setting the severty level is not supported by the plugin.

Once, you have configured ktlint, it is advised to run the plugin in distract free mode so that all violations which can be autocorrect will never be visible at all. The remaining violations which can not be autocorrected should be handled as an error.

Running the plugin in manual results in violations to be shown as warning.