C#


ROSLYN.MAINTAINABILITY.CA1501 : Avoid excessive inheritance (C#)

See Roslyn-Detected C# Warning Classes for more information.

Summary

Deeply nested type hierarchies can be difficult to follow, understand, and maintain. This rule limits analysis to hierarchies in the same module. To fix a violation of this rule, derive the type from a base type that is less deep in the inheritance hierarchy or eliminate some of the intermediate base types.

This check corresponds to Roslyn rule CA1501. For full rule details, see the Microsoft website: CA1501.

Properties

Class Name Avoid excessive inheritance (C#)
Significance reliability
Mnemonic ROSLYN.MAINTAINABILITY.CA1501
Categories None
Availability Available for C# only.
Enabling Checks for this warning class are disabled by default. To enable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Avoid excessive inheritance (C#)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.