CodeQL library for Python
codeql/python-all 0.11.12 (changelog, source)
Search

Member predicate FunctionMetrics::getCyclomaticComplexity

Gets the cyclomatic complexity of the function: The number of linearly independent paths through the source code. Computed as E - N + 2P, where E = the number of edges of the graph. N = the number of nodes of the graph. P = the number of connected components, which for a single function is 1.

int getCyclomaticComplexity()