From 6e48a51af7925e84988cb83f986a7d5d415a2ae2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 4 Oct 2021 13:12:37 +1100 Subject: 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. --- build_files/cmake/cmake_static_check_cppcheck.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'build_files') diff --git a/build_files/cmake/cmake_static_check_cppcheck.py b/build_files/cmake/cmake_static_check_cppcheck.py index 79b0e236ce5..0e37b9ba468 100644 --- a/build_files/cmake/cmake_static_check_cppcheck.py +++ b/build_files/cmake/cmake_static_check_cppcheck.py @@ -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=` 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) -- cgit v1.2.3