forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDebugStats.ql
More file actions
101 lines (100 loc) · 1.96 KB
/
DebugStats.ql
File metadata and controls
101 lines (100 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import python
from string msg, int cnt, int sort
where
sort = 0 and
msg = "Lines of code in DB" and
cnt = sum(Module m | | m.getMetrics().getNumberOfLinesOfCode())
or
sort = 1 and
msg = "Lines of code in repo" and
cnt =
sum(Module m | exists(m.getFile().getRelativePath()) | m.getMetrics().getNumberOfLinesOfCode())
or
sort = 2 and
msg = "Files" and
cnt = count(File f)
or
sort = 10 and msg = "----------" and cnt = 0
or
sort = 11 and
msg = "Modules" and
cnt = count(Module m)
or
sort = 12 and
msg = "Classes" and
cnt = count(Class c)
or
sort = 13 and
msg = "Functions" and
cnt = count(Function f)
or
sort = 14 and
msg = "async functions" and
cnt = count(Function f | f.isAsync())
or
sort = 15 and
msg = "*args params" and
cnt = count(Function f | f.hasVarArg())
or
sort = 16 and
msg = "**kwargs params" and
cnt = count(Function f | f.hasKwArg())
or
sort = 20 and msg = "----------" and cnt = 0
or
sort = 21 and
msg = "call" and
cnt = count(Call c)
or
sort = 22 and
msg = "for loop" and
cnt = count(For f)
or
sort = 23 and
msg = "comprehension" and
cnt = count(Comp c)
or
sort = 24 and
msg = "attribute" and
cnt = count(Attribute a)
or
sort = 25 and
msg = "assignment" and
cnt = count(Assign a)
or
sort = 26 and
msg = "await" and
cnt = count(Await a)
or
sort = 27 and
msg = "yield" and
cnt = count(Yield y)
or
sort = 28 and
msg = "with" and
cnt = count(With w)
or
sort = 29 and
msg = "raise" and
cnt = count(Raise r)
or
sort = 30 and
msg = "return" and
cnt = count(Return r)
or
sort = 31 and
msg = "match" and
cnt = count(MatchStmt m)
or
sort = 32 and
msg = "from ... import ..." and
cnt = count(Import i | i.isFromImport())
or
sort = 33 and
msg = "import ..." and
cnt = count(Import i | not i.isFromImport())
or
sort = 34 and
msg = "import *" and
cnt = count(ImportStar i)
select sort, msg, cnt order by sort