C#


ROSLYN.MAINTAINABILITY.CA1505 : Avoid unmaintainable code (C#)

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

Summary

The maintainability index is calculated by using the following metrics: lines of code, program volume, and cyclomatic complexity. Program volume is a measure of the difficulty of understanding of a symbol that is based on the number of operators and operands in the code. Cyclomatic complexity is a measure of the structural complexity of the type or method. A low maintainability index indicates that code is probably difficult to maintain and would be a good candidate to redesign.

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

Properties

Class Name Avoid unmaintainable code (C#)
Significance reliability
Mnemonic ROSLYN.MAINTAINABILITY.CA1505
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 unmaintainable code (C#)"

Relevant Configuration File Parameters

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