Files
Shipwright/.pre-commit-config.yaml
T
amafresh325 94f950f8d7 German (#7315)
Co-authored-by: serprex <159546+serprex@users.noreply.github.com>
2026-10-05 16:54:09 +00:00

27 lines
1014 B
YAML

# Local hooks run on commit: clang-format for staged C/C++ in soh/ (using a
# pinned 14.x downloaded by pre-commit), the whitespace and JSON asset lints. Scopes
# match run-clang-format.sh / scripts/lint-json.py and CI.
# pre-commit install --install-hooks # enable (downloads clang-format up front)
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.6
hooks:
- id: clang-format
files: '^soh/.*\.(c|cpp|h|hpp)$'
exclude: '^soh/assets/|^soh/(src|include)/.*\.(h|hpp)$'
- repo: local
hooks:
- id: lint-json
name: lint JSON assets
entry: scripts/lint-json.sh --fix
language: system
files: '^soh/assets/custom/.*\.json$'
pass_filenames: false
- id: whitespace
name: check staged C/C++ for tabs and trailing whitespace
entry: scripts/check-whitespace.sh
language: system
files: '^soh/.*\.(c|cpp|h|hpp)$'
exclude: '^soh/include/'
pass_filenames: false