nbadal / ktlint-intellij-plugin

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

Allow to run with ruleset of different ktlint version than bundled with plugin #426

Closed paul-dingemans closed 4 months ago

paul-dingemans commented 8 months ago

The plugin comes with a bundled version of the ktlint rule engine and ruleset. Users should however be in control to use the ruleset from another ktlint version which is compatible with currently bundled rule engine. For this the user needs to disable the bundled ruleset, and manually add at least one other ruleset. It is not necessary that an official ktlint ruleset is loaded, but user should be warned in that case.

Add a field like below: Screenshot 2023-12-26 at 14 08 19

The ruleset details should display the id of the RuleSetProvider and the path to file.

The current dialog has to be rewritten with Kotlin UI DSL (see reference):

UI forms like Dialogs or Settings should use Kotlin UI DSL (IntelliJ Platform 2021.3+).

Using UI Designer plugin with Kotlin is not supported.

For example, see https://plugins.jetbrains.com/docs/intellij/settings-tutorial.html#the-appsettingscomponent-class

paul-dingemans commented 5 months ago

Next version of plugin supports ktlint versions 0.50.0, 1.0.1, 1.1.1 and 1.2.1.

paul-dingemans commented 5 months ago

This feature will be postponed. Current solution has unwanted side effect that size of plugin increases with 64MB per version of ktlint rules included. See #498.