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.
pull/11445/head
Mark A. Tsuchida 5 months ago committed by Jussi Pakkanen
parent a6258eb5e2
commit 1951fe5cf0
  1. 2
      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)])

Loading…
Cancel
Save