From 00c0d78199fcfbbb20828be5e06fd2d271fa4c1e Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sun, 24 Mar 2024 23:49:26 +0100 Subject: Initial commit --- run_clang_tidy.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 run_clang_tidy.py (limited to 'run_clang_tidy.py') diff --git a/run_clang_tidy.py b/run_clang_tidy.py new file mode 100644 index 0000000..40d4a5e --- /dev/null +++ b/run_clang_tidy.py @@ -0,0 +1,17 @@ +import pathlib +import subprocess + +def is_file(path): + return path.is_file() + +def has_extension(extensions): + def f(path): + return path.suffix in extensions + return f + +ROOTS = ["./deimos", "./game"] + +for root in ROOTS: + for file in filter(has_extension([".cpp", ".c"]), filter(is_file, pathlib.Path(root).rglob("*"))): + subprocess.run(["clang-tidy", file, "-header-filter=deimos|game"]) + -- cgit