Skip to content

Commit 2e44129

Browse files
committed
Add target for running all pre-commit manually
The lint target excludes, e.g. clang-format-fix and clang-tidy.
1 parent 3ae541a commit 2e44129

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ repos:
3030
- id: clang-format-fix
3131
name: clang-format-fix
3232
entry: clang-format-18
33+
files: ^(src/|include/)
3334
types_or: [c++, c]
34-
language: python
35+
language: system
3536
args: ['-i']
3637
stages: [manual]
3738

@@ -43,11 +44,13 @@ repos:
4344
# - id: oclint
4445
# - id: cppcheck
4546
# - id: cpplint
47+
4648
- repo: https://github.com/pocc/pre-commit-hooks
4749
rev: v1.3.5
4850
hooks:
4951
- id: clang-tidy
5052
stages: [manual]
53+
additional_dependencies: ['clang-tidy==18.1.8']
5154

5255
- repo: https://github.com/codespell-project/codespell
5356
rev: v2.2.6

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ lint: venv
152152
lint: ## Run all configured tools in pre-commit
153153
$(PRE_COMMIT) run -a
154154

155+
lint-manual: venv
156+
lint-manual: ## Run all manual tools in pre-commit
157+
$(PRE_COMMIT) run --hook-stage manual -a
158+
155159
coverage: venv
156160
$(MAKE) CONFIG=Gcov test
157161
$(ACTIVATE) cmake --build $(_build_path) --config $(CONFIG) --target process_coverage

0 commit comments

Comments
 (0)