Custom PMD Rules for Static Code Analysis

Updated 1 week ago by Copado Solutions

To contribute your own rules please follow instructions here.

Once Copado has merged and released the custom rules provided by our community of users, you need to implement the following changes in your org in order to make sure the new rules are available:

  1. In Salesforce, navigate to Setup > Object Manager > Static Code Analysis Rule.
  2. In Fields & Relationships, click on the Rule Name field.
  3. Add the new rule names as picklist values (note this name is case sensitive).
  4. You can now select the new rules in your SCA settings records.

Once these settings have been completed, you will be ready to use the new rules available in our PMD Static Code Analysis integration.

As part of v16.2, you have to add the Rule Reference field to the Static Code Analysis Rule Layout. This field needs to be populated whenever a PMD rule is created. For more information about how to populate it, please check the Summer '20 (v16.2) - Release Notes.


How did we do?