Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
128 lines (127 loc) · 3.87 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
128 lines (127 loc) · 3.87 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
fail_fast: true
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: true
autoupdate_branch: ""
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: weekly
skip: [clang-format, meson-test-debug, clang-tidy]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-merge-conflict
- repo: https://github.com/codespell-project/codespell
rev: v2.4.3
hooks:
- id: codespell
- repo: https://github.com/executablebooks/mdformat
rev: 1.0.0
hooks:
- id: mdformat
args: [--wrap, "80"]
additional_dependencies:
- mdformat-gfm
- mdformat-gfm-alerts
- repo: https://github.com/google/yamlfmt
rev: v0.21.0
hooks:
- id: yamlfmt
- repo: local
hooks:
- id: clang-format
name: clang-format
entry: clang-format -i
language: system
files: \.(c|h)$
- id: meson-test-debug
name: Meson Test (Debug)
entry: |
bash -c '
if [ ! -d .pre-commit-builds/default-debug ]; then
meson setup .pre-commit-builds/default-debug --buildtype=debug
fi &&
meson test -C .pre-commit-builds/default-debug
'
language: system
pass_filenames: false
files: \.(c|h)$
- id: all-tests-gcc
name: All Tests (GCC)
entry: |
bash -c '
if [ ! -d .pre-commit-builds/gcc-release ]; then
CC=gcc meson setup .pre-commit-builds/gcc-release
fi &&
meson test -C .pre-commit-builds/gcc-release \
--suite unit_test \
--suite integration_short \
--suite integration_long \
--verbose
'
language: system
pass_filenames: false
files: \.(c|h|py|sh)$
stages: [manual]
- id: all-tests-gcc-debug
name: All Tests (GCC Debug)
entry: |
bash -c '
if [ ! -d .pre-commit-builds/gcc-debug ]; then
CC=gcc meson setup .pre-commit-builds/gcc-debug --buildtype=debug
fi &&
meson test -C .pre-commit-builds/gcc-debug \
--suite unit_test \
--suite integration_short \
--suite integration_long \
--verbose
'
language: system
pass_filenames: false
files: \.(c|h|py|sh)$
stages: [manual]
- id: all-tests-clang
name: All Tests (Clang)
entry: |
bash -c '
if [ ! -d .pre-commit-builds/clang-release ]; then
CC=clang meson setup .pre-commit-builds/clang-release
fi &&
meson test -C .pre-commit-builds/clang-release \
--suite unit_test \
--suite integration_short \
--suite integration_long \
--verbose
'
language: system
pass_filenames: false
files: \.(c|h|py|sh)$
stages: [manual]
- id: all-tests-clang-debug
name: All Tests (Clang Debug)
entry: |
bash -c '
if [ ! -d .pre-commit-builds/clang-debug ]; then
CC=clang meson setup .pre-commit-builds/clang-debug --buildtype=debug
fi &&
meson test -C .pre-commit-builds/clang-debug \
--suite unit_test \
--suite integration_short \
--suite integration_long \
--verbose
'
language: system
pass_filenames: false
files: \.(c|h|py|sh)$
stages: [manual]
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5
hooks:
- id: clang-tidy
args: ["-p=build", "--warnings-as-errors=*"]