Skip to content

Commit 2d5276a

Browse files
authored
chore(ci): Ensure clang-format version is consistent in pre-commit (#696)
Before this PR, running `pre-commit run --all-files` was not sufficient to result in passing CI (particularly on MacOS, where the brew installed clang-format is considerably newer than the CI-installed clang-format). This PR just makes the version that had been enforced in CI part of the configuration.
1 parent dd437a9 commit 2d5276a

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.pre-commit-config.yaml

+5-8
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@ repos:
2929
exclude: "^r/.*?/_snaps/.*?.md$"
3030
- id: trailing-whitespace
3131
exclude: "^r/.*?/_snaps/.*?.md$"
32-
- repo: https://github.com/pocc/pre-commit-hooks
33-
rev: v1.3.5
32+
- repo: https://github.com/pre-commit/mirrors-clang-format
33+
rev: v16.0.6
3434
hooks:
35-
- id: clang-format
36-
args: [-i]
37-
types_or: [c, c++]
38-
exclude: "(^thirdparty/.*$)|(flatcc_generated.h)"
35+
- id: clang-format
36+
types_or: [c, c++]
37+
exclude: "(^thirdparty/.*$)|(flatcc_generated.h)"
3938
- repo: https://github.com/cheshirekow/cmake-format-precommit
4039
rev: v0.6.13
4140
hooks:
@@ -75,5 +74,3 @@ repos:
7574
additional_dependencies: ['meson==1.6.0']
7675
entry: meson format -i
7776
files: meson.build
78-
79-
exclude: "^dist"

0 commit comments

Comments
 (0)