Method has too many statements

objectscriptQuality release 
1.0.0
Id 
OS0025
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 number of statements is above a certain threshold (50 by default; it is configurable).

The more statements a method has, the harder it is to read, test and modify. Consider splitting this method into smaller methods.

Parameters

NameDescriptionDefault value
nrStatementsThreshold
Maximum allowed number of statements
50