aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark A. Tsuchida <matsuchida@wisc.edu>2024-06-16 17:50:06 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2024-06-23 13:05:29 +0300
commit1951fe5cf0a69b0467859a35cc8e06c16de0a76a (patch)
tree4e7916b53e24a1eae5ef11d47a708ad62e42b2ab
parenta6258eb5e2660598b1039cf6ee88692a9091affd (diff)
downloadmeson-1951fe5cf0a69b0467859a35cc8e06c16de0a76a.zip
meson-1951fe5cf0a69b0467859a35cc8e06c16de0a76a.tar.gz
meson-1951fe5cf0a69b0467859a35cc8e06c16de0a76a.tar.bz2
clang-tidy: use -quiet
This adds the `-quiet` option when invoking clang-tidy for the generated `clang-tidy` target. (Note that the `clang-tidy-fix` target already does so.) This prevents messages like ``` Suppressed 1084 warnings (1084 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. ``` from being repeated for every file, which drowns out the actual warnings/errors from clang-tidy when more than a few files are processed. Also the tip about `-header-fileter` and `-system-headers` is not very useful here because Meson doesn't currently provide a way to supply these options to clang-tidy. Even with `-quiet`, clang-tidy still prints a line like `1084 warnings generated.` for each file.
-rw-r--r--mesonbuild/scripts/clangtidy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/scripts/clangtidy.py b/mesonbuild/scripts/clangtidy.py
index 353cdc1..1e0c4a5 100644
--- a/mesonbuild/scripts/clangtidy.py
+++ b/mesonbuild/scripts/clangtidy.py
@@ -11,7 +11,7 @@ from .run_tool import run_tool
import typing as T
def run_clang_tidy(fname: Path, builddir: Path) -> subprocess.CompletedProcess:
- return subprocess.run(['clang-tidy', '-p', str(builddir), str(fname)])
+ return subprocess.run(['clang-tidy', '-quiet', '-p', str(builddir), str(fname)])
def run_clang_tidy_fix(fname: Path, builddir: Path) -> subprocess.CompletedProcess:
return subprocess.run(['run-clang-tidy', '-fix', '-format', '-quiet', '-p', str(builddir), str(fname)])