-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
23 lines (23 loc) · 927 Bytes
/
.pre-commit-config.yaml
File metadata and controls
23 lines (23 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: local
hooks:
- id: clang-format
name: clang-format
entry: bash -c 'FILES=`find -type f -regex ".*\.\(cpp\|hpp\|h\|c\)$" -not -path "*/build/*"`; clang-format-14 --Werror $FILES -style=llvm -i'
language: system
types: [c]
pass_filenames: false
- id: cmake-format
entry: bash -c 'FILES=`find . -name "CMakeLists.txt"`; cmake-format $FILES -i'
language: system
types: [cmake]
pass_filenames: false
name: cmake-format
- id: shell-format
entry: bash -c 'shopt -s globstar; /home/arendjan/go/bin/shfmt -s -w **/**.sh'
language: system
types: [shell]
pass_filenames: false
name: shell-format