-
Notifications
You must be signed in to change notification settings - Fork 3
/
default.yml
324 lines (284 loc) · 9.3 KB
/
default.yml
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# Default configuration that all Affiance configurations inherit from.
#
# This is an opinionated list of which hooks are valuable to run and what their
# out-of-the-box settings should be.
#-------------------------------------------------------------------------------
# Where to store hook plugins specific to a repository. These are loaded in
# addition to the default hooks Affiance comes with. The location is relative
# to the root of the repository.
pluginDirectory: '.git-hooks'
# Number of hooks that can be run concurrently. Typically this won't need to be
# adjusted, but if you know that some of your hooks themselves use multiple
# processors you can lower this value accordingly. You can define
# single-operator mathematical expressions, e.g. '%{processors} * 2', or
# '%{processors} / 2'.
concurrency: '%{processors}'
# Whether to hide hook output by default. This results in completely silent hook
# runs except in the case of warning or failure.
quiet: false
# Whether to check if a hook plugin has changed since Affiance last ran it.
# This is a defense mechanism when working with repositories which can contain
# untrusted code (e.g. when you fetch a pull request from a third party).
# See https://github.com/l8on/affiance#security for more information.
verifySignatures: true
# This configuration changes the default location node modules are
# expected to be found. To enumerate the possible values and what they mean:
# * "local" - means all node modules will be installed locally and `npm bin`
# will be used to find the binary directory.
# * "global" - means all node modules will be install globally and the binaries
# are expected to be available in the $PATH of the current user.
# Defaults to "local"
nodeModuleMode: 'local'
# Hooks that are run against every commit message after a user has written it.
# These hooks are useful for enforcing policies on commit messages written for a
# project.
CommitMsg:
ALL:
requiresFiles: false
quiet: false
CapitalizedSubject:
enabled: true
description: 'Check subject capitalization'
EmptyMessage:
enabled: true
description: 'Check for empty commit message'
quiet: true
# Hooks that are run after `git commit` is executed, before the commit message
# editor is displayed. These hooks are ideal for syntax checkers, linters, and
# other checks that you want to run before you allow a commit object to be
# created.
PreCommit:
ALL:
problemOnUnmodifiedLine: report
requiresFiles: true
required: false
quiet: false
CoffeeLint:
enabled: false
description: 'Analyze with coffeelint'
requiredExecutable: './node_modules/.bin/coffeelint'
globalRequiredExecutable: 'coffeelint'
flags: ['--reporter=csv']
installCommand: 'npm install coffeelint'
globalInstallCommand: 'npm install -g coffeelint'
include: '**/*.coffee'
EsLint:
enabled: false
description: 'Analyze with ESLint'
requiredExecutable: './node_modules/.bin/eslint'
globalRequiredExecutable: 'eslint'
flags: ['--format=compact']
installCommand: 'npm install eslint'
globalInstallCommand: 'npm install -g eslint'
include: '**/*.js'
exclude: '*.yml'
NspCheck:
enabled: false
description: 'Check for module vulnerabilities with nsp'
quiet: false
requiredExecutable: 'nsp'
globalRequiredExecutable: 'nsp'
flags: ['check']
installCommand: 'npm install -g nsp'
globalInstallCommand: 'npm install -g nsp'
MergeConflicts:
enabled: true
description: 'Check for merge conflicts'
quiet: true
requiredExecutable: 'grep'
flags: ['-IHn', '^<<<<<<<[ \t]']
MochaOnly:
enabled: false
description: 'Check for .only in mocha tests'
quiet: true
requiredExecutable: 'grep'
flags: ['-EIHn', '(it|describe)\.only']
include: 'test/**/*.js'
Spectral:
enabled: false
description: 'Analyze with Spectral'
requiredExecutable: './node_modules/.bin/spectral'
globalRequiredExecutable: 'spectral'
flags: ['lint', '--quiet', '--ignore-unknown-format', '--format', 'text']
installCommand: 'npm install @stoplight/spectral-cli'
globalInstallCommand: 'npm install -g @stoplight/spectral-cli'
include:
- '**/*.json'
- '**/*.yml'
- '**/*.yaml'
exclude: 'package.json'
StylusLint:
enabled: false
description: "Analyze with stylus linter"
quiet: false
requiredExecutable: './node_modules/.bin/stylint'
globalRequiredExecutable: 'stylint'
requiredLibrary: 'stylint-json-reporter'
flags: ['--reporter', 'stylint-json-reporter']
installCommand: 'npm install stylint stylint-json-reporter'
globalInstallCommand: 'npm install -g stylint stylint-json-reporter'
include: '**/*.styl'
TsLint:
enabled: false
description: 'Analyze with TsLint'
requiredExecutable: './node_modules/.bin/tslint'
globalRequiredExecutable: 'tslint'
flags: ['--format', 'prose']
installCommand: 'npm install tslint'
globalInstallCommand: 'npm install -g tslint'
include: '**/*.ts'
exclude: '*.yml'
# Hooks that run after HEAD changes or a file is explicitly checked out.
PostCheckout:
ALL:
required: false
quiet: false
skipFileCheckout: true
NpmInstall:
enabled: false
description: 'Install NPM dependencies'
requiresFiles: true
requiredExecutable: 'npm'
flags: ['install']
include:
- 'package.json'
- 'npm-shrinkwrap.json'
NpmOutdated:
enabled: false
description: 'Check if installed NPM dependencies are out of date'
requiresFiles: false
requiredExecutable: 'npm'
flags: ['outdated']
NspCheck:
enabled: false
description: 'Check for module vulnerabilities with nsp'
quiet: false
requiredExecutable: 'nsp'
globalRequiredExecutable: 'nsp'
flags: ['check']
installCommand: 'npm install -g nsp'
globalInstallCommand: 'npm install -g nsp'
# Hooks that run after a commit is created.
PostCommit:
ALL:
requiresFiles: false
required: false
quiet: false
NpmInstall:
enabled: false
description: 'Install NPM dependencies'
requiresFiles: true
requiredExecutable: 'npm'
flags: ['install']
include:
- 'package.json'
- 'npm-shrinkwrap.json'
NpmOutdated:
enabled: false
description: 'Check if installed NPM dependencies are out of date'
requiresFiles: false
requiredExecutable: 'npm'
flags: ['outdated']
NspCheck:
enabled: false
description: 'Check for module vulnerabilities with nsp'
quiet: false
requiredExecutable: 'nsp'
globalRequiredExecutable: 'nsp'
flags: ['check']
installCommand: 'npm install -g nsp'
globalInstallCommand: 'npm install -g nsp'
# Hooks that run after `git merge` executes successfully (no merge conflicts).
PostMerge:
ALL:
requiresFiles: false
quiet: false
NpmInstall:
enabled: false
description: 'Install NPM dependencies'
requiresFiles: true
requiredExecutable: 'npm'
flags: ['install']
include:
- 'package.json'
- 'npm-shrinkwrap.json'
NpmOutdated:
enabled: false
description: 'Check if installed NPM dependencies are out of date'
requiresFiles: false
requiredExecutable: 'npm'
flags: ['outdated']
NspCheck:
enabled: false
description: 'Check for module vulnerabilities with nsp'
quiet: false
requiredExecutable: 'nsp'
globalRequiredExecutable: 'nsp'
flags: ['check']
installCommand: 'npm install -g nsp'
globalInstallCommand: 'npm install -g nsp'
# Hooks that run after a commit is modified by an amend or rebase.
PostRewrite:
ALL:
requiresFiles: false
quiet: false
NpmInstall:
enabled: false
description: 'Install NPM dependencies'
requiresFiles: true
requiredExecutable: 'npm'
flags: ['install']
include:
- 'package.json'
- 'npm-shrinkwrap.json'
NpmOutdated:
enabled: false
description: 'Check if installed NPM dependencies are out of date'
requiresFiles: false
requiredExecutable: 'npm'
flags: ['outdated']
NspCheck:
enabled: false
description: 'Check for module vulnerabilities with nsp'
quiet: false
requiredExecutable: 'nsp'
globalRequiredExecutable: 'nsp'
flags: ['check']
installCommand: 'npm install -g nsp'
globalInstallCommand: 'npm install -g nsp'
# Hooks that run during `git push`, after remote refs have been updated but
# before any objects have been transferred.
PrePush:
ALL:
requiresFiles: false
required: false
quiet: false
NspCheck:
enabled: false
description: 'Check for module vulnerabilities with nsp'
quiet: false
requiredExecutable: 'nsp'
globalRequiredExecutable: 'nsp'
flags: ['check']
installCommand: 'npm install -g nsp'
globalInstallCommand: 'npm install -g nsp'
Mocha:
enabled: false
description: 'Run Mocha test suite'
requiredExecutable: './node_modules/.bin/mocha'
ProtectedBranches:
enabled: false
description: 'Check for illegal pushes to protected branches'
destructiveOnly: true
branches: ['master']
# Hooks that run during `git rebase`, before any commits are rebased.
# If a hook fails, the rebase is aborted.
PreRebase:
ALL:
requiresFiles: false
required: false
quiet: false
MergedCommits:
enabled: false
description: 'Check for commits that have already been merged'
branches: ['master']