Usage
With PMD Gradle plugin
Add PMD plugin:
build.gradle
apply plugin: 'pmd'
pmd {
// pmd plugin config
}
Add this library to the PMD classpath:
build.gradle
sourceSets {
pmd
}
dependencies {
pmdRuntime 'io.github.juliantcook:pmd-rules:0.0.1'
}
// set classpath for appropriate PMD tasks
tasks.pmdMain.doFirst {
pmdClasspath += sourceSets.pmd.runtimeClasspath
}
These rules can then be used.