mirror of
https://github.com/github/codeql.git
synced 2026-01-17 00:14:51 +01:00
20 lines
594 B
Plaintext
20 lines
594 B
Plaintext
/**
|
|
* @name Cyclomatic complexity of functions
|
|
* @description The cyclomatic complexity per function (an indication of how many tests are necessary,
|
|
* based on the number of branching statements).
|
|
* @kind treemap
|
|
* @id py/cyclomatic-complexity-per-function
|
|
* @treemap.warnOn highValues
|
|
* @metricType callable
|
|
* @metricAggregate avg max sum
|
|
* @tags testability
|
|
* complexity
|
|
* maintainability
|
|
*/
|
|
|
|
import python
|
|
|
|
from Function func, int complexity
|
|
where complexity = func.getMetrics().getCyclomaticComplexity()
|
|
select func, complexity order by complexity desc
|