Files
codeql/javascript/ql/src/Metrics/FunCyclomaticComplexity.ql
2018-08-02 17:53:23 +01:00

18 lines
455 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
* @precision very-high
* @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