Here's a simple application, which helps to generate necessary jar file with custom rules.
- Pull the project
- Create your rules and add it to
CustomRuleProvider.kt
- Locate task
:generator:createRules
- Run it
rules.jar
file will be atDetektRuleGenerator\generator\rules\
- Copy
rules.jar
into your project - Add reference
rules.jar
into your gradledetekt
task. (Add -p or --plugins and pass path as an argument).
def params = ['-p', %PATH_TO_RULES_JAR%]