cppheck: improvements to checking script

Various changes that simplify running cppcheck, comparing results
from the previous execution.

- Create a summary of the log that groups errors by type,
  useful since some kinds of warnings tend to lead to errors in the
  code more than others.
- Keep a copy of the previous runs logs - useful for comparisons.
- Log the output in the order of the files selected to check.
- Fix non thread-safe output sometimes mixing warnings from different
  processes.
This commit is contained in:
Campbell Barton
2024-04-14 20:37:12 +10:00
parent 0a192c5da4
commit f6605523e8
3 changed files with 258 additions and 44 deletions

View File

@@ -481,9 +481,7 @@ check_cppcheck: .FORCE
@$(CMAKE_CONFIG)
@cd "$(BUILD_DIR)" ; \
$(PYTHON) \
"$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
"$(BLENDER_DIR)/check_cppcheck.txt"
@echo "written: check_cppcheck.txt"
"$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py"
check_struct_comments: .FORCE
@$(CMAKE_CONFIG)