Skip to content

Commit 88abc8f

Browse files
committed
Rust: Add to summary stats.
1 parent a4c06b2 commit 88abc8f

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,29 @@
77
*/
88

99
import rust
10+
import codeql.rust.Diagnostics
1011
import Stats
1112

1213
from string key, string value
1314
where
14-
key = "Files extracted" and value = count(File f | exists(f.getRelativePath())).toString()
15-
or
1615
key = "Elements extracted" and value = count(Element e | not e instanceof Unextracted).toString()
1716
or
1817
key = "Elements unextracted" and value = count(Unextracted e).toString()
1918
or
19+
key = "Extraction errors" and value = count(ExtractionError e).toString()
20+
or
21+
key = "Extraction warnings" and value = count(ExtractionWarning w).toString()
22+
or
23+
key = "Files extracted - total" and value = count(File f | exists(f.getRelativePath())).toString()
24+
or
25+
key = "Files extracted - with errors" and
26+
value =
27+
count(File f | exists(f.getRelativePath()) and not f instanceof SuccessfullyExtractedFile)
28+
.toString()
29+
or
30+
key = "Files extracted - without errors" and
31+
value = count(SuccessfullyExtractedFile f | exists(f.getRelativePath())).toString()
32+
or
2033
key = "Lines of code extracted" and value = getLinesOfCode().toString()
2134
or
2235
key = "Lines of user code extracted" and value = getLinesOfUserCode().toString()
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
| Elements extracted | 210 |
22
| Elements unextracted | 0 |
3-
| Files extracted | 6 |
3+
| Extraction errors | 6 |
4+
| Extraction warnings | 0 |
5+
| Files extracted - total | 6 |
6+
| Files extracted - with errors | 1 |
7+
| Files extracted - without errors | 5 |
48
| Lines of code extracted | 48 |
59
| Lines of user code extracted | 48 |

0 commit comments

Comments
 (0)