forked from jlebar/pre-commit-hooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-hooks.yaml
167 lines (143 loc) · 4.49 KB
/
.pre-commit-hooks.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
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
- id: bazel-buildifier
name: bazel buildifier
description: Runs `buildifier`, requires buildifier binary
entry: buildifier
files: '^(.*/)?(BUILD\.bazel|BUILD|WORKSPACE|WORKSPACE\.bzlmod)$|\.BUILD$|\.bzl$'
language: system
- id: do-not-submit
name: DO NOT SUBMIT
description: Forbids the string "DO NOT SUBMIT".
entry: check_do_not_submit.py
language: script
files: '.*'
- id: clang-format-diff
name: clang-format-diff
entry: clang_format_entry.sh
language: script
args: ['16.0.0','diff']
require_serial: true
# git-clang-format does not take kindly to being run in parallel; it writes
# to a speicfic file in .git.
#
# TODO: Can we fix git-clang-format so it's parallel-friendly?
# Fun fact, clang-format can format more than just C and C++!
#
# Less-fun fact, "types: [c, c++]" means "files that are C *and* C++", i.e.
# ".h" files. If you want to clang-format your C and C++ code, AFAICT
# you'll need separate rules. Or I guess you can use a "files:" regexp.
#
# See README.md for usage examples.
- id: clang-format-whole-file
name: clang-format-whole-file
entry: clang_format_entry.py
language: script
args: ['16.0.0','whole-file']
require_serial: false
- id: clang-format-diff-3.6.0
name: clang-format-diff-3.6.0
entry: clang_format_entry.py
language: script
args: ['3.6.0','diff']
require_serial: true
- id: clang-format-whole-file-3.6.0
name: clang-format-whole-file-3.6.0
entry: clang_format_entry.py
language: script
args: ['3.6.0','whole-file']
require_serial: false
- id: clang-format-diff-3.7.0
name: clang-format-diff-3.7.0
entry: clang_format_entry.py
language: script
args: ['3.7.0','diff']
require_serial: true
- id: clang-format-whole-file-3.8.0
name: clang-format-whole-file-3.8.0
entry: clang_format_entry.py
language: script
args: ['3.8.0','whole-file']
require_serial: false
- id: clang-format-diff-3.9.0
name: clang-format-diff-3.9.0
entry: clang_format_entry.py
language: script
args: ['3.9.0','diff']
require_serial: true
- id: clang-format-whole-file-3.9.0
name: clang-format-whole-file-3.9.0
entry: clang_format_entry.py
language: script
args: ['3.9.0','whole-file']
require_serial: false
- id: clang-format-diff-4.0.0
name: clang-format-diff-4.0.0
entry: clang_format_entry.py
language: script
args: ['4.0.0','diff']
require_serial: true
- id: clang-format-whole-file-4.0.0
name: clang-format-whole-file-4.0.0
entry: clang_format_entry.py
language: script
args: ['4.0.0','whole-file']
require_serial: false
- id: clang-format-diff-5.0.0
name: clang-format-diff-5.0.0
entry: clang_format_entry.py
language: script
args: ['5.0.0','diff']
require_serial: true
- id: clang-format-whole-file-5.0.0
name: clang-format-whole-file-5.0.0
entry: clang_format_entry.py
language: script
args: ['5.0.0','whole-file']
require_serial: false
- id: clang-format-diff-8.0.0
name: clang-format-diff-8.0.0
entry: clang_format_entry.py
language: script
args: ['8.0.0','diff']
require_serial: true
- id: clang-format-whole-file-8.0.0
name: clang-format-whole-file-8.0.0
entry: clang_format_entry.py
language: script
args: ['8.0.0','whole-file']
require_serial: false
- id: clang-format-diff-11.0.0
name: clang-format-diff-11.0.0
entry: clang_format_entry.py
language: script
args: ['11.0.0','diff']
require_serial: true
- id: clang-format-whole-file-11.0.0
name: clang-format-whole-file-11.0.0
entry: clang_format_entry.py
language: script
args: ['11.0.0','whole-file']
require_serial: false
- id: clang-format-diff-15.0.0
name: clang-format-diff-15.0.0
entry: clang_format_entry.py
language: script
args: ['15.0.0','diff']
require_serial: true
- id: clang-format-whole-file-15.0.0
name: clang-format-whole-file-15.0.0
entry: clang_format_entry.py
language: script
args: ['15.0.0','whole-file']
require_serial: false
- id: clang-format-diff-16.0.0
name: clang-format-diff-16.0.0
entry: clang_format.py
language: script
args: ['16.0.0','diff']
require_serial: true
- id: clang-format-whole-file-16.0.0
name: clang-format-whole-file-16.0.0
entry: clang_format.py
language: script
args: ['16.0.0','whole-file']
require_serial: false