Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-10-04 05:12:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-04 05:12:37 +0300
commit6e48a51af7925e84988cb83f986a7d5d415a2ae2 (patch)
treed2e5fb5d3e45ab0451ceda71dafaf7fbb885e666 /build_files/cmake
parent606271966e1344958d43f5660be1ae46d2637738 (diff)
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.
Diffstat (limited to 'build_files/cmake')
-rw-r--r--build_files/cmake/cmake_static_check_cppcheck.py10
1 files changed, 8 insertions, 2 deletions
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=<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)