Skip to content

Commit 25e4b79

Browse files
committed
Rust: Exclude skipped files from MacroCallTargetStats.
1 parent 6f1eca8 commit 25e4b79

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

rust/ql/src/queries/telemetry/DatabaseQuality.qll

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,21 @@ module CallTargetStats implements StatsSig {
3131
}
3232

3333
module MacroCallTargetStats implements StatsSig {
34-
int getNumberOfOk() { result = count(MacroCall c | c.hasMacroCallExpansion()) }
34+
int getNumberOfOk() {
35+
result =
36+
count(MacroCall c |
37+
not c.getFile().(ExtractedFile).isSkippedByCompilation() and c.hasMacroCallExpansion()
38+
)
39+
}
3540

3641
additional predicate isNotOkCall(MacroCall c) { not c.hasMacroCallExpansion() }
3742

38-
int getNumberOfNotOk() { result = count(MacroCall c | isNotOkCall(c)) }
43+
int getNumberOfNotOk() {
44+
result =
45+
count(MacroCall c |
46+
not c.getFile().(ExtractedFile).isSkippedByCompilation() and isNotOkCall(c)
47+
)
48+
}
3949

4050
string getOkText() { result = "macro calls with call target" }
4151

0 commit comments

Comments
 (0)