From eea694959e87509fbac758f4b297df03e3d9eb83 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 15 Oct 2025 11:07:45 +0100 Subject: [PATCH] Rust: Restrict macro call stats in DatabaseQualityDiagnostics to extracted files (.fromSource). This is already the case in other places we measure this. --- rust/ql/src/queries/telemetry/DatabaseQuality.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/ql/src/queries/telemetry/DatabaseQuality.qll b/rust/ql/src/queries/telemetry/DatabaseQuality.qll index 15826fec4c45..04e3b8e648ca 100644 --- a/rust/ql/src/queries/telemetry/DatabaseQuality.qll +++ b/rust/ql/src/queries/telemetry/DatabaseQuality.qll @@ -30,9 +30,9 @@ module CallTargetStats implements StatsSig { } module MacroCallTargetStats implements StatsSig { - int getNumberOfOk() { result = count(MacroCall c | c.hasMacroCallExpansion()) } + int getNumberOfOk() { result = count(MacroCall c | c.fromSource() and c.hasMacroCallExpansion()) } - additional predicate isNotOkCall(MacroCall c) { not c.hasMacroCallExpansion() } + additional predicate isNotOkCall(MacroCall c) { c.fromSource() and not c.hasMacroCallExpansion() } int getNumberOfNotOk() { result = count(MacroCall c | isNotOkCall(c)) }