-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
.overcommit.yml
581 lines (436 loc) · 11.9 KB
/
.overcommit.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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
---
# This is an opinionated list of which hooks are valuable to run and what their
# out-of-the-box settings should be.
# -------------------------------------------------------------------------------
# Loads Bundler context from a Gemfile. If false, does nothing (default).
#
# Specifying a Gemfile for Bundler to load allows you to control which gems are
# available in the load path (i.e. loadable via `require`) within your hook
# runs. Note that having a Gemfile requires you to include `overcommit` itself
# in your Gemfile (otherwise Overcommit can't load itself!).
#
# This is useful if you want to:
#
# - Enforce a specific version of Overcommit to use for all hook runs
# (or to use a version from the master branch that has not been released yet)
# - Enforce a specific version or unreleased branch is used for a gem you want
# to use in your git hooks
#
# WARNING: This makes your hook runs slower, but you can work around this!
#
# Loading a Bundler context necessarily adds a startup delay to your hook runs
# as Bundler parses the Gemfile and checks that the dependencies are satisfied.
# Thus for projects with many gems this can introduce a noticeable delay.
#
# The recommended workaround is to create a separate Gemfile in the root of your
# repository (call it `.overcommit_gems.rb`), and include only the gems that
# your Overcommit hooks need in order to run. This significantly reduces the
# startup delay in your hook runs. Make sure to commit both
# `.overcommit_gems.rb` and the resulting `.overcommit_gems.rb.lock` file to
# your repository, and then set the `gemfile` option below to the name you gave
# the file.
# (Generate lock file by running `bundle install --gemfile=.overcommit_gems.rb`)
gemfile: false
# Where to store hook plugins specific to a repository. These are loaded in
# addition to the default hooks Overcommit comes with. The location is relative
# to the root of the repository.
plugin_directory: '.git-hooks'
# Whether to hide hook output by default. This results in completely silent hook
# runs except in the case of warning or failure.
quiet: false
# 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 check if a hook plugin has changed since Overcommit 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/brigade/overcommit#security for more information.
verify_signatures: true
PreCommit:
ALL:
problem_on_unmodified_line: 'report'
requires_files: true
required: false
exclude:
- 'bower_components/**/*'
- 'node_modules/**/*'
- 'vendor/**/*'
AuthorEmail:
enabled: true
AuthorName:
enabled: true
BerksfileCheck:
enabled: true
Brakeman:
enabled: false
BrokenSymlinks:
enabled: true
BundleAudit:
enabled: true
include:
- 'Gemfile'
- 'Gemfile.lock'
- '*.gemspec'
BundleCheck:
enabled: true
include:
- 'Gemfile'
- 'Gemfile.lock'
- '*.gemspec'
BundleOutdated:
enabled: true
include:
- 'Gemfile'
- 'Gemfile.lock'
- '*.gemspec'
CaseConflicts:
enabled: true
ChamberSecurity:
enabled: true
CoffeeLint:
enabled: true
CookStyle:
enabled: false
Credo:
enabled: true
include:
- '**/*.ex'
- '**/*.exs'
CssLint:
enabled: false
Dogma:
enabled: true
EsLint:
enabled: true
ExecutePermissions:
enabled: true
exclude:
- 'Rakefile'
- 'bin/**/*'
- 'scripts/**/*'
Fasterer:
enabled: false
include:
- '**/*.rb'
FileSize:
enabled: true
size_limit_bytes: 1_000_000
exclude:
- 'db/structure.sql'
- 'db/schema.rb'
FixMe:
enabled: true
exclude:
- '.overcommit.yml'
- '.rubocop_core.yml'
- 'bin/deploy'
keywords:
- 'BROKEN'
- 'BUG'
- 'ERROR'
- 'FIXME'
- 'HACK'
- 'NOTE'
- 'OPTIMIZE'
- 'REVIEW'
- 'TODO'
- 'WTF'
- 'XXX'
Flay:
enabled: false
Foodcritic:
enabled: false
ForbiddenBranches:
enabled: false
GoLint:
enabled: true
GoVet:
enabled: true
Hadolint:
enabled: false
HamlLint:
enabled: false
HardTabs:
enabled: true
exclude:
- '**/*.svg'
- '**/Info.plist'
- '**/project.pbxproj'
- '**/structure.sql'
- '**/xcschememanagement.plist'
Hlint:
enabled: true
HtmlHint:
enabled: true
HtmlTidy:
enabled: false
ImageOptim:
enabled: false
JavaCheckstyle:
enabled: true
Jscs:
enabled: false
JsHint:
enabled: false
JsLint:
enabled: false
Jsl:
enabled: false
JsonSyntax:
enabled: true
KtLint:
enabled: false
LicenseFinder:
enabled: false
LicenseHeader:
enabled: false
licence_file: 'LICENSE.txt'
LineEndings:
enabled: true
LocalPathsInGemfile:
enabled: true
Mdl:
enabled: false
include:
- '**/*.md'
MergeConflicts:
enabled: true
NginxTest:
enabled: true
Pep257:
enabled: false
Pep8:
enabled: false
PhpCs:
enabled: true
PhpLint:
enabled: false
PhpStan:
enabled: true
Pronto:
enabled: false
PuppetLint:
enabled: true
PuppetMetadataJsonLint:
enabled: true
Pyflakes:
enabled: false
Pylint:
enabled: false
PythonFlake8:
enabled: false
RailsBestPractices:
enabled: false
RailsSchemaUpToDate:
enabled: true
include:
- '**/db/migrate/*.rb'
- '**/db/schema.rb'
- '**/db/structure.sql'
RakeTarget:
enabled: false
Reek:
enabled: false
RstLint:
enabled: false
RuboCop:
enabled: true
RubyLint:
enabled: false
Scalariform:
enabled: false
Scalastyle:
enabled: false
ScssLint:
enabled: false
SemiStandard:
enabled: false
ShellCheck:
enabled: true
flags:
- '--format=gcc'
- '-e SC1090'
- '-e SC1117'
- '-e SC2148'
- '-e SC2155'
- '-e SC2181'
include:
- '**/*.sh'
- '**/*.bash'
- '**/*.zsh'
- '**/bash_profile'
- '**/bashrc'
- '**/zshrc'
SlimLint:
enabled: false
Sqlint:
enabled: true
Standard:
enabled: false
Stylelint:
enabled: true
SwiftLint:
enabled: true
TerraformFormat:
enabled: true
TrailingWhitespace:
enabled: true
exclude: '**/structure.sql'
TravisLint:
enabled: true
TsLint:
enabled: true
include:
- '**/*.ts'
Vint:
enabled: true
W3cCss:
enabled: false
W3cHtml:
enabled: false
XmlLint:
enabled: true
XmlSyntax:
enabled: true
YamlLint:
enabled: true
include:
- '**/*.yaml'
- '**/*.yml'
on_warn: 'fail'
YamlSyntax:
enabled: true
YardCoverage:
enabled: false
YarnCheck:
enabled: true
PrePush:
ALL:
requires_files: false
required: false
CargoTest:
enabled: false
GitLfs:
enabled: true
flags:
- 'pre-push'
Minitest:
enabled: false
ProtectedBranches:
enabled: false
RSpec:
enabled: false
PreRebase:
ALL:
requires_files: false
required: false
MergedCommits:
enabled: false
CommitMsg:
ALL:
requires_files: false
CapitalizedSubject:
enabled: true
Commitplease:
enabled: false
EmptyMessage:
enabled: false
GerritChangeId:
enabled: false
HardTabs:
enabled: true
MessageFormat:
enabled: true
pattern: '(Add|Fix|Change|Remove|Deprecate|Security|Docs|Style|Tests|Chore|WIP):\s'
expected_pattern_message: '<Change Type>: <Commit Message Description>'
sample_message: 'Chore: Refactor onboarding flow'
RussianNovel:
enabled: false
SingleLineSubject:
enabled: true
SpellCheck:
enabled: false
TextWidth:
enabled: true
max_subject_width: 72
max_body_width: 80
TrailingPeriod:
enabled: true
PostCheckout:
ALL:
required: false
skip_file_checkout: true
BowerInstall:
enabled: false
BundleCheck:
enabled: true
GitLfs:
enabled: false
flags:
- 'post-checkout'
IndexTags:
enabled: false
NpmInstall:
enabled: false
SubmoduleStatus:
enabled: true
PostCommit:
ALL:
requires_files: false
required: false
BowerInstall:
enabled: false
BundleInstall:
enabled: false
GitGuilt:
enabled: false
GitLfs:
enabled: false
flags:
- 'post-commit'
IndexTags:
enabled: false
NpmInstall:
enabled: false
SubmoduleStatus:
enabled: true
YarnInstall:
enabled: false
PostMerge:
ALL:
enabled: false
requires_files: false
BowerInstall:
enabled: false
BundleInstall:
enabled: false
GitLfs:
enabled: false
flags:
- 'post-merge'
IndexTags:
enabled: false
NpmInstall:
enabled: false
SubmoduleStatus:
enabled: false
YarnInstall:
enabled: false
PostRewrite:
ALL:
requires_files: false
BowerInstall:
enabled: false
BundleInstall:
enabled: false
IndexTags:
enabled: false
NpmInstall:
enabled: false
SubmoduleStatus:
enabled: false
YarnInstall:
enabled: false