Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
paul-dingemans opened this issue Dec 26, 2023 · 2 comments · Fixed by #487
Closed
Milestone

Comments

@paul-dingemans
Copy link
Collaborator

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 paul-dingemans added this to the 0.21.0 milestone Dec 26, 2023
@paul-dingemans paul-dingemans modified the milestones: 0.21.0, 0.22.0 Feb 25, 2024
paul-dingemans added a commit that referenced this issue Mar 19, 2024
The StandardRulesetProvider from each supported version of ktlint is transformed with shadow plugin to a unique class so that multiple versions of the StandardRulesetProvider class can be compiled into the plugin.

Closes #426
Closes #35
@paul-dingemans
Copy link
Collaborator Author

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

paul-dingemans added a commit that referenced this issue Mar 24, 2024
* Support multiple versions of ktlint standard ruleset

The StandardRulesetProvider from each supported version of ktlint is transformed with shadow plugin to a unique class so that multiple versions of the StandardRulesetProvider class can be compiled into the plugin.

Closes #426
Closes #35

* Increase build memory
paul-dingemans added a commit that referenced this issue Apr 7, 2024
* Support multiple versions of ktlint standard ruleset

The StandardRulesetProvider from each supported version of ktlint is transformed with shadow plugin to a unique class so that multiple versions of the StandardRulesetProvider class can be compiled into the plugin.

Closes #426
Closes #35

* Increase build memory

(cherry picked from commit 516955b)
@paul-dingemans
Copy link
Collaborator Author

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.

@paul-dingemans paul-dingemans reopened this Apr 7, 2024
@paul-dingemans paul-dingemans modified the milestones: 0.22.0, 0.23.0 Apr 7, 2024
paul-dingemans added a commit that referenced this issue Apr 10, 2024
* Support multiple versions of ktlint standard ruleset

The StandardRulesetProvider from each supported version of ktlint is transformed with shadow plugin to a unique class so that multiple versions of the StandardRulesetProvider class can be compiled into the plugin.

Closes #426
Closes #35

* Increase build memory

(cherry picked from commit 516955b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant