nbadal / ktlint-intellij-plugin

Ktlint plugin for IntelliJ IDEA + Android Studio
MIT License
151 stars 23 forks source link

Add resolve all violations for one particular rule in the current file #479

Closed paul-dingemans closed 3 months ago

paul-dingemans commented 4 months ago

Add option to resolve all violations for the highlighted rule in the current file. For example resolve all trailing comma's on declaration site in the current file:

Screenshot 2024-03-03 at 18 34 08

This can be realized by adding the particular rule to the RuleProviders and then format the file.

paul-dingemans commented 3 months ago

A rule can emit multiple different violations. It might be confusing to offfer an intention to suppress all violations emitted by a rule as the user might expect that only the specific type of violation for which the intention is shown will be resolved.