Class has too many methods

objectscriptQuality release 
1.0.0
Id 
OS0033
Rule type 
Code Smell
Severity 

Major

Major
SQALE characteristic 
  • Changeability
    • Logic
Tags 
design, maintainability
Remediation function 
Constant/issue
Remediation cost 
8h

This rule checks that a given class has a number of methods which is less than, or equal to, a configurable threshold. A class with too many methods is often an indication that this class needs to be refactored into several, smaller classes.

Note that class methods are not accounted for.

Parameters

NameDescriptionDefault value
nrMethodsThreshold
Maximum number of methods allowed for a class
10