mirror of
https://github.com/github/codeql.git
synced 2026-01-16 16:04:45 +01:00
17 lines
394 B
Plaintext
17 lines
394 B
Plaintext
/**
|
|
* @name Number of tests
|
|
* @description The number of test methods defined in a module
|
|
* @kind treemap
|
|
* @treemap.warnOn lowValues
|
|
* @metricType file
|
|
* @metricAggregate avg sum max
|
|
* @id py/tests-in-files
|
|
*/
|
|
|
|
import python
|
|
import semmle.python.filters.Tests
|
|
|
|
from Module m, int n
|
|
where n = strictcount(Test test | test.getEnclosingModule() = m)
|
|
select m.getFile(), n order by n desc
|