-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-hooks.yaml
More file actions
30 lines (30 loc) · 1.05 KB
/
.pre-commit-hooks.yaml
File metadata and controls
30 lines (30 loc) · 1.05 KB
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
---
- id: clang-format
name: clang-format
description: Format C code using clang-format.
language: system
files: \.(c|cc|cxx|cpp|h|hpp|hxx)$
entry: sh -c 'if [ -f .clang-format ]; then git ls-files | grep -E "\.(c|cc|cxx|cpp|h|hpp|hxx)$" | sed "s/.*/\"&\"/" | xargs clang-format -i -style=file;
else git ls-files | grep -E "\.(c|cc|cxx|cpp|h|hpp|hxx)$" | sed "s/.*/\"&\"/" | xargs clang-format -i -style=Microsoft; fi'
args: []
- id: cppcheck
name: cppcheck
description: Check correctness of C code using cppcheck.
language: system
files: \.(c|cc|cxx|cpp|h|hpp|hxx)$
entry: cppcheck --error-exitcode=1
args: [--enable=warning]
- id: hlint
name: hlint
description: Haskell code checker. It gives suggestions to improve code.
language: system
files: \.hs$
entry: hlint .
args: []
- id: fourmolu
name: fourmolu
description: Haskell code formatter.
language: system
files: \.hs$
entry: fourmolu -i .
args: []