check_spelling: rename check_spelling_osl -> check_spelling_shaders

- 'make check_spelling_shaders' now checks MSL & GLSL spelling.
- Add '--match' argument to 'check_spelling.py' for more configurable
  checks without relying on picking directories that only contain the
  desired file-type.
- Ignore spelling for scripts/addons & scripts/addons_contrib.
This commit is contained in:
Campbell Barton
2023-09-03 21:35:01 +10:00
parent d1c2b45836
commit 9af2291541
3 changed files with 97 additions and 29 deletions

View File

@@ -81,9 +81,9 @@ Documentation Checking
Spell Checkers
This runs the spell checker from the developer tools repositor.
* check_spelling_c: Check for spelling errors (C/C++ only),
* check_spelling_osl: Check for spelling errors (OSL only).
* check_spelling_py: Check for spelling errors (Python only).
* check_spelling_c: Check for spelling errors (C/C++ only),
* check_spelling_py: Check for spelling errors (Python only).
* check_spelling_shaders: Check for spelling errors (GLSL,OSL & MSL only).
Note: an additional word-list is maintained at: 'tools/check_source/check_spelling_c_config.py'
@@ -492,24 +492,31 @@ check_spelling_py: .FORCE
@cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/scripts"
--cache-file=$(CHECK_SPELLING_CACHE) \
--match=".*\.(py)$$" \
"$(BLENDER_DIR)/scripts" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/tools"
check_spelling_c: .FORCE
@cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/tools/check_source/check_spelling.py" \
--cache-file=$(CHECK_SPELLING_CACHE) \
--match=".*\.(c|cc|cpp|cxx|h|hh|hpp|hxx|inl|m|mm)$$" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
"$(BLENDER_DIR)/intern/ghost"
check_spelling_osl: .FORCE
check_spelling_shaders: .FORCE
@cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/tools/check_source/check_spelling.py" \
--cache-file=$(CHECK_SPELLING_CACHE) \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
--match=".*\.(osl|msl|glsl)$$" \
"$(BLENDER_DIR)/intern/" \
"$(BLENDER_DIR)/source/"
check_descriptions: .FORCE
@$(BLENDER_BIN) --background -noaudio --factory-startup --python \