mirror of
https://github.com/github/codeql.git
synced 2026-01-20 01:44:54 +01:00
Except for Metrics/Dependencies/ExternalDependenciesSourceLinks.ql, since it is rather tricky :D
17 lines
414 B
Plaintext
17 lines
414 B
Plaintext
/**
|
|
* @name Direct imports per file
|
|
* @description The number of modules directly imported by this file.
|
|
* @kind treemap
|
|
* @id py/direct-imports-per-file
|
|
* @treemap.warnOn highValues
|
|
* @metricType file
|
|
* @metricAggregate avg max
|
|
* @tags modularity
|
|
* maintainability
|
|
*/
|
|
import python
|
|
|
|
from ModuleValue m, int n
|
|
where n = count(ModuleValue imp | imp = m.getAnImportedModule())
|
|
select m.getScope(), n
|