New PMD Rules
Copado now supports PMD version 6.25. As part of this upgrade, the following rules have been added to the default RuleSet:
In order to ensure these new rules are available, follow the steps below:
- Navigate to Setup > Object Manager > Static Code Analysis Rule.
- Go to Fields & Relationships and click on Rule Name.
- Scroll down to Values and click on New to add the new rules.
- Add the new rule names as picklist values (note that this name is case sensitive).
- Once you have added all the new picklist values, go to the Static Code Analysis Setting record and create static code analysis rules for the new values added:
- Select the name of the rule you have added in the Rule Name field.
- Add a priority. You can use the one defined by PMD in their documentation or define a custom priority that suits you better.
- Enter a message.
- Repeat this process for all the other new rules.