diff options
author | Michele Dionisio <michele.dionisio@gmail.com> | 2020-09-27 20:36:54 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-10-12 18:17:15 +0300 |
commit | eef880f509255a43e53fc9ed04e9e6bcf6ac98bc (patch) | |
tree | 9c66a62cfd35ff5440a0f9a843649c02a9150b2d /mesonbuild/scripts/clangtidy.py | |
parent | aae23dfff3aa8269a07b6d42479a00923bf73c6e (diff) | |
download | meson-eef880f509255a43e53fc9ed04e9e6bcf6ac98bc.zip meson-eef880f509255a43e53fc9ed04e9e6bcf6ac98bc.tar.gz meson-eef880f509255a43e53fc9ed04e9e6bcf6ac98bc.tar.bz2 |
exclude generated file from clang-tidy processing
by default run_clang_tidy process al file in compile_commands.json but
the file generated has to be esclude like already done from
manual_clangformat
Diffstat (limited to 'mesonbuild/scripts/clangtidy.py')
-rw-r--r-- | mesonbuild/scripts/clangtidy.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/scripts/clangtidy.py b/mesonbuild/scripts/clangtidy.py index 03aa8c7..dfaf998 100644 --- a/mesonbuild/scripts/clangtidy.py +++ b/mesonbuild/scripts/clangtidy.py @@ -15,6 +15,8 @@ import pathlib import subprocess import shutil +import os +import re from concurrent.futures import ThreadPoolExecutor import typing as T @@ -44,7 +46,7 @@ def clangformat(srcdir_name: str, builddir_name: str) -> int: run_clang_tidy = rct break if run_clang_tidy: - return subprocess.run([run_clang_tidy, '-p', builddir_name]).returncode + return subprocess.run([run_clang_tidy, '-p', builddir_name, '^(?!' + re.escape(builddir_name + os.path.sep) +').*$']).returncode else: print('Could not find run-clang-tidy, running checks manually.') manual_clangformat(srcdir_name, builddir_name) |