Files
PMD will run on files with the following extensions:.java.jsp.kt(Kotlin).apex(Salesforce Apex)pom.xml(Maven)
Configuration
PMD uses an XML configuration file when one is available. If no PMD configuration is present, CodeRabbit generates a default ruleset based on the selected review profile. PMD supports the following config files:-
User-defined config file set at
reviews.tools.pmd.config_filein your project’s.coderabbit.yamlfile or setting the “Reviews → Tools → PMD → Config File” field in CodeRabbit’s settings page. -
If no user-defined config file is found, CodeRabbit looks for the following config file in the repo:
ruleset.xml
ruleset.xml is found, CodeRabbit uses its generated default ruleset.
When we skip PMD
CodeRabbit will skip running PMD when:- PMD is disabled in CodeRabbit settings or
.coderabbit.yaml. - PMD is already running in GitHub workflows.