PMD Version: 6.7.0
PMD is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, etc.
To enable PMD analysis, add the following to your
.codeclimate.yml configuration file:
plugins: pmd: enabled: true
More information about the CLI is available in the README here: https://github.com/codeclimate/codeclimate
This engine ships with the following configuration: https://pmd.github.io/pmd-5.8.1/pmd-java/rules/index.html#Basic - you are highly encouraged to use your own! More configuration documentation is available here: https://pmd.github.io/pmd-5.8.1/pmd-java/rules/index.html
If the file
ruleset.xml is present in the root directory of the project, it is used as the default
ruleset without extra configuration.
plugins: pmd: enabled: true config: file: pmd-rules.xml
Alternatively, you can specify a list of rule names, instead of a
plugins: pmd: enabled: true config: rules: - "java-basic" - "java-design" - "java-android"
For more information about all the checks available and their configuration options, please check out the documentation here: https://pmd.github.io/
Updated about a year ago