Skip to content

Commit d7d4658

Browse files
committed
Rust: Add % of files extractor without errors to summary stats.
1 parent 9715ffd commit d7d4658

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ where
3232
key = "Files extracted - without errors" and
3333
value = count(SuccessfullyExtractedFile f | exists(f.getRelativePath()))
3434
or
35+
key = "Files extracted - without errors %" and
36+
value =
37+
(count(SuccessfullyExtractedFile f | exists(f.getRelativePath())) * 100) /
38+
count(ExtractedFile f | exists(f.getRelativePath()))
39+
or
3540
key = "Lines of code extracted" and value = getLinesOfCode()
3641
or
3742
key = "Lines of user code extracted" and value = getLinesOfUserCode()

rust/ql/test/query-tests/diagnostics/SummaryStats.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
| Files extracted - total | 7 |
66
| Files extracted - with errors | 3 |
77
| Files extracted - without errors | 4 |
8+
| Files extracted - without errors % | 57 |
89
| Inconsistencies - AST | 0 |
910
| Inconsistencies - CFG | 0 |
1011
| Inconsistencies - data flow | 0 |

0 commit comments

Comments
 (0)