CodeQL library for C#
codeql/csharp-all 0.6.1 ( changelog , source )
Search

Member predicate Callable :: getCyclomaticComplexity

Gets the number of branching statements (if, while, do, for, foreach switch, case, catch) plus the number of branching expressions (?, &&, ||, ??) plus one. Callables with a high cyclomatic complexity (> 10) are hard to test and maintain, given their large number of possible execution paths. They should be refactored.

int getCyclomaticComplexity ( )