Files
codeql/javascript/ql/src/Metrics/FunCyclomaticComplexity.ql
2021-03-25 15:12:09 +00:00

17 lines
432 B
Plaintext

/**
* @name Cyclomatic complexity of functions
* @description The cyclomatic complexity of a function.
* @kind treemap
* @treemap.warnOn highValues
* @metricType callable
* @metricAggregate avg max sum
* @tags testability
* @id js/cyclomatic-complexity-per-function
*/
import javascript
from Function func, int complexity
where complexity = func.getCyclomaticComplexity()
select func, complexity order by complexity desc