how does custom rulesets work w/ the recommended s...
# ktlint
e
how does custom rulesets work w/ the recommended setup? I get how I would add it in the gradle plugin / CI execution using a maven dependency to the jar, but how about the IntelliJ plugin and CLI (precommit-hook)?
It would be incredibly convenient if one could simply point towards a maven coordinate and have it fetched from there automatically 🙂
p
Ktlint CLI allows you to dynamically load custom rulesets:
Copy code
ktlint --ruleset=/path/to/custom-ruleset.jar
API Consumers that use the
KtlintRuleEngine
can just provide custom rules to the set of rules that the engine needs to proces.
e
I saw the option, but I’m considering what would be the most convenient way to distribute a custom ruleset across a team 🙂
p
There are multiple ways to do so. Please see https://pinterest.github.io/ktlint/latest/install/integrations/ for some inspiration.