forked from HarbourMasters/Shipwright
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
26 lines (26 loc) · 977 Bytes
/
Copy path.pre-commit-config.yaml
File metadata and controls
26 lines (26 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Local hooks run on commit: clang-format for staged C/C++ in soh/ (using a
# pinned 14.x downloaded by pre-commit), the tab 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: no-tabs
name: check staged C/C++ for tabs
entry: scripts/check-no-tabs.sh
language: system
files: '^soh/.*\.(c|cpp|h|hpp)$'
exclude: '^soh/include/'
pass_filenames: false