Skip to content

Commit 9c4ff82

Browse files
authored
Add .pre-commit-config.yaml (#497)
1 parent 7c4610f commit 9c4ff82

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.pre-commit-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Pre-commit hooks for automated formatting and linting
2+
# See https://pre-commit.com for more information
3+
# See https://pre-commit.com/hooks.html for more hooks
4+
5+
repos:
6+
# C++ formatting with clang-format
7+
- repo: https://github.com/pre-commit/mirrors-clang-format
8+
rev: v20.1.7
9+
hooks:
10+
- id: clang-format
11+
files: \.(cpp|hpp|c|h)$
12+
exclude: ^(3rdparty/|build.*/|install/)
13+
args: [--style=file]
14+
15+
# CMake formatting
16+
- repo: https://github.com/cheshirekow/cmake-format-precommit
17+
rev: v0.6.13
18+
hooks:
19+
- id: cmake-format
20+
files: \.(cmake|CMakeLists\.txt)$
21+
exclude: ^(3rdparty/|build.*/|install/)
22+
23+
# Configuration
24+
default_stages: [pre-commit]
25+
fail_fast: false

0 commit comments

Comments
 (0)