check_cppcheck: use quiet output
Without this, each cppcheck invocation included all defines/includes flooding the console with unhelpful information. Also remove nonexistent directory to exclude.
This commit is contained in:
parent
606271966e
commit
6e48a51af7
|
@ -36,7 +36,6 @@ USE_QUIET = (os.environ.get("QUIET", None) is not None)
|
|||
|
||||
CHECKER_IGNORE_PREFIX = [
|
||||
"extern",
|
||||
"intern/moto",
|
||||
]
|
||||
|
||||
CHECKER_BIN = "cppcheck"
|
||||
|
@ -49,6 +48,10 @@ CHECKER_ARGS = [
|
|||
# "--check-config", # when includes are missing
|
||||
"--enable=all", # if you want sixty hundred pedantic suggestions
|
||||
|
||||
# Quiet output, otherwise all defines/includes are printed (overly verbose).
|
||||
# Only enable this for troubleshooting (if defines are not set as expected for example).
|
||||
"--quiet",
|
||||
|
||||
# NOTE: `--cppcheck-build-dir=<dir>` is added later as a temporary directory.
|
||||
]
|
||||
|
||||
|
@ -81,7 +84,10 @@ def cppcheck() -> None:
|
|||
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
|
||||
|
||||
sys.stdout.flush()
|
||||
sys.stdout.write("%s " % percent_str)
|
||||
sys.stdout.write("%s %s\n" % (
|
||||
percent_str,
|
||||
os.path.relpath(c, project_source_info.SOURCE_DIR)
|
||||
))
|
||||
|
||||
return subprocess.Popen(cmd)
|
||||
|
||||
|
|
Loading…
Reference in New Issue