FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/python/ql/src/Metrics/DirectImports.ql at codeql-cli/v2.27.1 · github/codeql · GitHub
github
codeql
Repository navigation
Code
Issues
1k
(1k)
Pull requests
487
(487)
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
python
/
ql
/
src
/
Metrics
/
DirectImports.ql
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (16 loc) · 445 Bytes
Breadcrumbs
codeql
/
python
/
ql
/
src
/
Metrics
/
DirectImports.ql
Copy path
File metadata and controls
18 lines (16 loc) · 445 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/**
* @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
private
import
LegacyPointsTo
from
ModuleValue
m
,
int
n
where
n
=
count
(
ModuleValue
imp
|
imp
=
m
.
getAnImportedModule
(
)
)
select
m
.
getScope
(
)
,
n
Back
|
FazBrowse Home
|
New Git URL