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. 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 “Review → Tools → PMD → Config File” field in CodeRabbit’s settings page. -
If no user-defined config file is found, we look for the following config file in the repo:
ruleset.xml
When we skip PMD
CodeRabbit will skip running PMD when:- No config file is found (user-defined config file or
ruleset.xml). - PMD is already running in GitHub workflows.