Method is too complex

objectscriptQuality release 
1.0.0
Id 
OS0017
Rule type 
Code Smell
Severity 

Critical

Critical
SQALE characteristic 
  • Maintainability
    • Maintainability compliance
Tags 
design, maintainability
Remediation function 
Constant/issue
Remediation cost 
3d

This rule reports any method or class method whose complexity is above a certain threshold (20 by default; it is configurable).

The more complex a method is, the harder it is to read, test and modify. This is a strong indication that the code should be refactored.

Parameters

NameDescriptionDefault value
complexityThreshold
Maximum allowed complexity
20