Gradle’s pmd plugin is okay, but it behaves in surprising ways out of the box compared to better plugins like Checkstyle and FindBugs.
- Gradle PMD strangely has console output disabled by default, forcing users to manually open report files, where most other linters simply show the warnings in the console. In the future, could consoleOutput please default to
true
? - Gradle PMD makes it really hard to figure out how to exclude classes from being linted (for example, Java code generated from the Thrift plugin). The ordinary PMDExtension documentation doesn’t mention how to do this.
https://docs.gradle.org/current/dsl/org.gradle.api.plugins.quality.PmdExtension.html
As it happens, the Pmd docs cover this feature, as a configurable excludes
property in the pmdMain
task.
https://docs.gradle.org/current/dsl/org.gradle.api.plugins.quality.Pmd.html
Could we please expose these properties to the top-level pmd
configuration block? That’s the first place I would have looked to configure PMD, as I would for other linter plugins.