I have PMD checks in my build.gradle
like this:
apply plugin: "pmd"
dependencies {
pmd "net.sourceforge.pmd:pmd-java:5.5.+"
}
/*** PMD ***/
pmd {
ignoreFailures = true
}
tasks.withType(Pmd) {
excludes = ["**/gen/*"]
reports {
xml.enabled = true
html.enabled = true
}
}
Which ruleset is used here?
I would like to configure the same ruleset for the eclipse PMD plugin (Project Properties -> PMD - Add). Ideally eclipse project is configured by gradle to have the correct settings.
The default config for Gradle is using java-basic
(source)
However, this is a very conservative approach that takes little advantage of all PMD has to offer.
My personal advice as a PMD maintainer is that you:
Both Gradle and the PMD Eclipse plugin can load rules from a ruleset on file, making it easy to keep both of them in sync at all times.