qtil
advanced-security/qtil-csharp 0.0.3
Search

Predicate cyclomaticComplexity

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.

Import path

import semmle.code.csharp.metrics.Complexity
predicate cyclomaticComplexity(Callable c, int n)