Create Static Code Analysis Settings with Default RuleSet

Updated 1 week ago by Copado Solutions

To create static code analysis settings with default RuleSet, follow the steps below:

  1. Navigate to the Static Code Analysis Settings page.
  2. Click on New.
  3. Fill in the New Static Code Analysis Settings Name field and click on Save.
  4. Open Static Code Analysis Settings and click on Generate Default RuleSet.

Customize RuleSet

RuleSet can be customized (Add, Edit and Delete). Each rule has a priority within a 1 to 5 interval, and it  can be defined according to the relevance of the violated rule. 

Notes: 

  • A rule with priority 1 is considered as the most important rule and a rule with priority 5 as the least
  • The scoring is calculated by subtracting the selected priority from 6 (6 - selected priority).
  • A high number of violated rules will throw a high static code analysis result (the higher the worst).

There is a total of 34 rules specially tailored to enforce Apex code best practices.

Assign Static Code Analysis RuleSet to a Deployment Flow

Navigate to the Deployment Flow page, open a deployment flow and assign Static Code Analysis Settings to it.

Once you assign static code analysis settings to a deployment flow, org credentials and user stories with environments inside this flow will take this SCA settings when requesting a new static code analysis. 


How did we do?