Files
codeql/javascript/ql/src/Metrics/FFunctions.ql
2019-01-07 10:15:45 +00:00

17 lines
380 B
Plaintext

/**
* @name Number of functions in files
* @description The number of functions in a file.
* @kind treemap
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @precision very-high
* @id js/functions-per-file
*/
import javascript
from File f, int n
where n = count(Function fun | fun.getTopLevel().getFile() = f)
select f, n order by n desc