Skip to content

Commit c53179f

Browse files
authored
Merge pull request #17499 from geoffw0/morestats
Rust: Add more summary stats.
2 parents c5cbf82 + 83376af commit c53179f

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

rust/ql/src/queries/summary/SummaryStats.ql

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ import Stats
1111

1212
from string key, string value
1313
where
14-
key = "Lines of code" and value = getLinesOfCode().toString()
14+
key = "Files extracted" and value = count(File f | exists(f.getRelativePath())).toString()
1515
or
16-
key = "Lines of user code" and value = getLinesOfUserCode().toString()
16+
key = "Elements extracted" and value = count(Element e | not e instanceof Unextracted).toString()
17+
or
18+
key = "Elements unextracted" and value = count(Unextracted e).toString()
19+
or
20+
key = "Lines of code extracted" and value = getLinesOfCode().toString()
21+
or
22+
key = "Lines of user code extracted" and value = getLinesOfUserCode().toString()
1723
select key, value
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
| Lines of code | 24 |
2-
| Lines of user code | 24 |
1+
| Elements extracted | 61 |
2+
| Elements unextracted | 26 |
3+
| Files extracted | 6 |
4+
| Lines of code extracted | 24 |
5+
| Lines of user code extracted | 24 |

0 commit comments

Comments
 (0)