COPADO-DEVELOPER practice question 8 of 15

You have a PMD static code analysis rule with priority 2. If this rule is violated once, what will be the violation score?

Full set: 84 questions
Answer options
A: 3
B: 4 Correct answer
C: 6
D: 2
Correct Answer:
B. 4
Explanation

Copado multiplies each PMD violation by the factor ( 6 – priority ). (6 – 2)=4, so one priority-2 violation adds 4 points to the total score.

Why Incorrect

A. (6-3)=3 applies only to a priority-3 rule, not 2.
C. (6-?)=6 would require a priority-0 rule, which PMD does not have.
D. Priority value itself (2) is not the score; it is only an input to the formula.

References

1. Copado Documentation “Static Code Analysis Scoring”, Winter ’23, §Violation Score Formula, para 2.

2. PMD Official Guide “Rule Priorities”, v6.55.0, §2.2.

Scroll to Top