Width of Inheritance Tree too large for class

objectscriptQuality release 
1.0.0
Id 
M0003
Rule type 
Code Smell
Severity 

Major

Major
SQALE characteristic 
  • Reusability
    • Reusability Compliance
Tags 
design
Remediation function 
Constant/issue
Remediation cost 
2d

This check computes the Width of Inheritance Tree, that is the number of leaves in the dependency tree.

For instance, for a class named MyClass, let's suppose that we have:

  • MyClass inherits classes Class1 and Class2;
  • Class1 inherits classes Base1 and Base2.

Then the width of inheritance tree of MyClass is 3.

Parameters

NameDescriptionDefault value
witThreshold
Maximum allowed width of inheritance tree
3