From 6d3fc319dc9efceecd1d34e583305ef732906074 Mon Sep 17 00:00:00 2001 From: Asger F Date: Tue, 27 Oct 2026 08:59:03 +0100 Subject: [PATCH] Fix check-query-ids reporting files as duplicates of themselves Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- misc/scripts/check-query-ids.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/scripts/check-query-ids.py b/misc/scripts/check-query-ids.py index 4158b992ec7c..a11ce03b5328 100755 --- a/misc/scripts/check-query-ids.py +++ b/misc/scripts/check-query-ids.py @@ -20,7 +20,8 @@ def main(): query_ids: Dict[str, List[str]] = {} # Just check src folders for now to avoid churn - for query_path in Path().glob("**/src/**/*.ql"): + # The glob can yield the same file more than once when its path contains several `src` folders. + for query_path in sorted(set(Path().glob("**/src/**/*.ql"))): # Skip compiled query packs if any(p == ".codeql" for p in query_path.parts): continue