-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.pre-commit-config.yaml
32 lines (32 loc) · 1.03 KB
/
.pre-commit-config.yaml
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
27
28
29
30
31
32
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.0.8 # or higher tag
hooks:
- id: yamlfmt
- repo: local
hooks:
- id: clang-format
name: Run Clang Format
files: \.[ch](pp|xx|\+\+)?$
language: system
entry: clang-format
args: [-style=file, -i]
- id: clang-tidy
name: Run Clang Tidy
files: \.[c](pp|xx|\+\+)?$
language: system
verbose: true
entry: >
bash -c '
BUILD=$(find -type f -name compile_commands.json -printf "%h" -quit)
&& clang-tidy -p "$BUILD" -fix "$0" "$@"'