diff --git a/script/clang-tidy b/script/clang-tidy index b5905e0e4e..7e51e3192b 100755 --- a/script/clang-tidy +++ b/script/clang-tidy @@ -152,7 +152,9 @@ def run_tidy(executable, args, options, tmpdir, path_queue, lock, failed_files): if sys.stdout.isatty(): invocation.append("--use-color") - invocation.append(f"--header-filter={os.path.abspath(basepath)}/.*") + invocation.append( + f"--header-filter=^{os.path.abspath(basepath)}/(?!.*\\.platformio/).*" + ) invocation.append(os.path.abspath(path)) invocation.append("--") invocation.extend(options)