mirror of
https://github.com/github/codeql.git
synced 2026-03-28 02:08:17 +01:00
19 lines
438 B
Plaintext
19 lines
438 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
|
|
* @precision medium
|
|
* @precision very-high
|
|
* @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
|