Next: , Previous: Declarations_In_Blocks, Up: Predefined Rules


23.7.9 Deep_Inheritance_Hierarchies

Flags a tagged derived type declaration or an interface type declaration if its depth (in its inheritance hierarchy) exceeds the value specified by the N rule parameter.

The inheritance depth of a tagged type or interface type is defined as 0 for a type with no parent and no progenitor, and otherwise as 1 + max of the depths of the immediate parent and immediate progenitors.

This rule does not flag private extension declarations. In the case of a private extension, the corresponding full declaration is checked.

This rule has the following (mandatory) parameter for the +R option:

N
Integer not less than -1 specifying the maximal allowed depth of any inheritance hierarchy. If the rule parameter is set to -1, the rule flags all the declarations of tagged and interface types.