PMD SCA Violations

Updated 2 months ago by Copado Solutions

When you run code analysis, a Static Code Analysis Result is created with information about the violated rules (if relevant) and the scoring. Each rule has a priority within a 1 to 5 interval, and it can be defined according to the relevance of the violated rule (1 is considered as the most important rule and a rule with priority 5 as the least). Violated rules with a high priority number will throw a high static code analysis result, which means that the higher the result the worse.

To review the Violations, open the Static Code Analysis Result record and navigate to the Static Code Analysis Violations related list:

This related list relies on the latest static code analysis job to be completed. It may take some time for it to be generated.

Static Code Analysis Violations

SCA Violations Details
  • Score: The score is calculated by subtracting the selected rule priority from 6 (6 - selected priority).
  • File: References the file where the violation has been found.
  • Line: Line of the file.
  • Rule: Name of the rule violated. This can be a default rule or a custom rule.
  • Priority: Priority assigned to the rule.
  • Info URL: Link to the rule information on PMD's site.
  • Message

How did we do?