SDL: Limit default search path of build-scripts/check_stdlib_usage.py

From dd6f438efb28f50bd1dd398473c824cb2566dc33 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Thu, 18 Jun 2026 20:23:13 +0200
Subject: [PATCH] Limit default search path of
 build-scripts/check_stdlib_usage.py

---
 build-scripts/check_stdlib_usage.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/build-scripts/check_stdlib_usage.py b/build-scripts/check_stdlib_usage.py
index a0b6e64e6806c..f944e27dedf4b 100755
--- a/build-scripts/check_stdlib_usage.py
+++ b/build-scripts/check_stdlib_usage.py
@@ -255,15 +255,17 @@ def find_symbols_in_dir(path: pathlib.Path) -> int:
 
 def main():
     parser = argparse.ArgumentParser(fromfile_prefix_chars="@")
-    parser.add_argument("path", default=SDL_ROOT, nargs="?", type=pathlib.Path, help="Path to look for stdlib symbols")
+    parser.add_argument("paths", default=[SDL_ROOT / "src", SDL_ROOT / "test"], nargs="*", type=pathlib.Path, help="Paths to look for stdlib symbols")
     args = parser.parse_args()
 
-    print(f"Looking for stdlib usage in {args.path}...")
+    print(f"Looking for stdlib usage in {', '.join(str(p) for p in args.paths)}...")
 
-    if args.path.is_file():
-        match_count = find_symbols_in_file(args.path)
-    else:
-        match_count = find_symbols_in_dir(args.path)
+    match_count = 0
+    for path in args.paths:
+        if path.is_file():
+            match_count = find_symbols_in_file(path)
+        else:
+            match_count = find_symbols_in_dir(path)
 
     if match_count:
         print("If the stdlib usage is intentional, add a '// This should NOT be SDL_<symbol>()' line comment.")