nbadal / ktlint-intellij-plugin

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

Support correcting individual lint violations #533

Closed paul-dingemans closed 3 weeks ago

paul-dingemans commented 3 weeks ago

When running in 'manual' mode, users expect to be able to fix individual lint violations via the autocorrect of ktlint. In older versions of the plugin this option was already available, but once chosen it would autocorrect all lint violations in the file for which the autocorrect is available. Typically, users of the 'manual' mode want to be in control and determine which autocorrect fix is to be applied, and which fix is not to be applied.

The autocorrect option for an individual lint violation, will only be offered when all following conditions are met: