Tools: add a utility to validate array sizes
The script check_source/static_check_size_comments.py run directly or called via the convenience target "make check_size_comments". Add a utility module: `line_number_utils` which implements a version of `re.finditer` that includes line numbers & ranges.
This commit is contained in:
@@ -64,6 +64,7 @@ Static Source Code Checking
|
||||
|
||||
* check_clang_array: Run blender source through clang array checking script (C & C++).
|
||||
* check_struct_comments: Check struct member comments are correct (C & C++).
|
||||
* check_size_comments: Check array size comments match defines/enums (C & C++).
|
||||
* check_deprecated: Check if there is any deprecated code to remove.
|
||||
* check_descriptions: Check for duplicate/invalid descriptions.
|
||||
* check_licenses: Check license headers follow the SPDX license specification,
|
||||
@@ -502,6 +503,10 @@ check_struct_comments: .FORCE
|
||||
"$(BLENDER_DIR)/tools/check_source/static_check_clang.py" \
|
||||
--checks=struct_comments --match=".*" --jobs=$(NPROCS)
|
||||
|
||||
check_size_comments: .FORCE
|
||||
$(PYTHON) \
|
||||
"$(BLENDER_DIR)/tools/check_source/static_check_size_comments.py"
|
||||
|
||||
check_clang_array: .FORCE
|
||||
@$(CMAKE_CONFIG)
|
||||
@cd "$(BUILD_DIR)" ; \
|
||||
|
||||
Reference in New Issue
Block a user