Files
codeql/python/ql/src/Metrics/FFunctionsAndMethods.ql
2018-11-19 15:10:42 +00:00

18 lines
435 B
Plaintext

/**
* @name Functions and methods per file
* @description Measures the number of functions and methods in a file.
* @kind treemap
* @id py/functions-and-methods-per-file
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags maintainability
*/
import python
from Module m, int n
where n = count(Function f | f.getEnclosingModule() = m and f.getName() != "lambda")
select m, n
order by n desc