C#


ROSLYN.MAINTAINABILITY.CA1502 : Avoid excessive complexity (C#)

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

要旨

Cyclomatic complexity measures the number of linearly independent paths through the method, which is determined by the number and complexity of conditional branches. A low cyclomatic complexity generally indicates a method that is easy to understand, test, and maintain. The cyclomatic complexity is calculated from a control flow graph of the method and is given as follows: `cyclomatic complexity = the number of edges - the number of nodes + 1`, where a node represents a logic branch point and an edge represents a line between nodes.

この指摘はRoslynのCA1502に該当します。ルール詳細につい ては、下記リンクを参照してください。 CA1502

プロパティ

クラス名 Avoid excessive complexity (C#)
日本語クラス名 Avoid excessive complexity (C#)
クラス分類 信頼性 (reliability)
ニーモニック ROSLYN.MAINTAINABILITY.CA1502
カテゴリー なし
対応言語 C# で利用可能です。
有効/無効設定 このワーニングクラスのチェックはデフォルトで無効になっています。チェックを有効にするにはプロジェクト設定ファイル (configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += allow class="Avoid excessive complexity (C#)"

関連のある設定ファイルパラメータ

設定ファイルの以下のパラメータがこのワーニングクラスのチェックに影響します。