Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 643 Bytes

ModifiedCyclomaticComplexity.md

File metadata and controls

8 lines (6 loc) · 643 Bytes

ModifiedCyclomaticComplexity

Category: pmd
Rule Key: pmd:ModifiedCyclomaticComplexity

⚠️ This rule is deprecated in favour of java:MethodCyclomaticComplexity.


Complexity directly affects maintenance costs is determined by the number of decision points in a method plus one for the method entry. The decision points include 'if', 'while', 'for', and 'case labels' calls. Generally, numbers ranging from 1-4 denote low complexity, 5-7 denote moderate complexity, 8-10 denote high complexity, and 11+ is very high complexity. Modified complexity treats switch statements as a single decision point.