Maintainability Warnings

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Maintainability Warnings.

Maintainability warnings support library and application maintenance.

RuleDescription
CA1500: Variable names should not match field namesAn instance method declares a parameter or a local variable whose name matches an instance field of the declaring type, which leads to errors.
CA1501: Avoid excessive inheritanceA type is more than four levels deep in its inheritance hierarchy. Deeply nested type hierarchies can be difficult to follow, understand, and maintain.
CA1502: Avoid excessive complexityThis rule measures the number of linearly independent paths through the method, which is determined by the number and complexity of conditional branches.
CA1504: Review misleading field namesThe name of an instance field starts with "s_", or the name of a static (Shared in Visual Basic) field starts with "m_".
CA1505: Avoid unmaintainable codeA type or method has a low maintainability index value. A low maintainability index indicates that a type or method is probably difficult to maintain and would be a good candidate for redesign.
CA1506: Avoid excessive class couplingThis rule measures class coupling by counting the number of unique type references that a type or method contains.

Measuring Complexity and Maintainability of Managed Code

Show: