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

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()