Closed peter-evans closed 1 year ago
I think this can only be managed via the kotlinter-gradle plugin configuration as described here. The plugin uses the KtlintLintRuleEngine and provides the rules that have to be run. Also, that would work both for the rulesets provided by Ktlint as well as for custom rulesets.
Thank you. I wasn't aware of that functionality. Looks like that covers our use case.
Expected Behavior
It would be great if rules sets could be versioned. Something like:
Setting this in config would allow us to upgrade ktlint (via kotlinter-gradle) while keeping the same rule sets. We could then upgrade our rule sets version independently at a more convenient time.
Not specifying this config would just default to the latest rule sets version.
The version could be consistent with the version of ktlint, or independently versioned.
Current Behavior
ktlint (via the kotlinter-gradle plugin) has been great and worked well for us. The only minor inconvenience is the rule changes that have happened on version bumps of ktlint. We automate dependency updates and when rule changes occur it means we have to manually fix PRs to have them merged.
Additional information