forked from sds/overcommit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.yml
395 lines (337 loc) · 9.97 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
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
# Default configuration that all Overcommit 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 Overcommit comes with. The location is relative
# to the root of the repository.
plugin_directory: '.git-hooks'
# 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/causes/overcommit#security for more information.
verify_plugin_signatures: true
# 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:
requires_files: false
quiet: false
GerritChangeId:
enabled: false
description: 'Ensuring Gerrit Change-Id is present'
required: true
HardTabs:
description: 'Checking for hard tabs'
RussianNovel:
description: 'Checking length of commit message'
quiet: true
SingleLineSubject:
description: 'Checking subject line'
TextWidth:
description: 'Checking text width'
max_subject_width: 60
max_body_width: 72
TrailingPeriod:
description: 'Checking for trailing periods in subject'
# 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:
problem_on_unmodified_line: warn
requires_files: true
required: false
quiet: false
AuthorEmail:
description: 'Checking author email'
requires_files: false
required: true
quiet: true
pattern: '^[^@]+@.*$'
AuthorName:
description: 'Checking for author name'
requires_files: false
required: true
quiet: true
BerksfileCheck:
description: 'Checking Berksfile lock'
required_executable: 'berks'
flags: ['list', '--quiet']
install_command: 'gem install berks'
include:
- 'Berksfile'
- 'Berksfile.lock'
Brakeman:
enabled: false
description: 'Checking for security vulnerabilities'
required_executable: 'brakeman'
flags: ['--exit-on-warn', '--quiet', '--summary', '--only-files']
install_command: 'gem install brakeman'
include:
- '**/*.rb'
BrokenSymlinks:
description: 'Checking for broken symlinks'
quiet: true
BundleCheck:
description: 'Checking Gemfile dependencies'
required_executable: 'bundle'
flags: ['check']
install_command: 'gem install bundler'
include:
- 'Gemfile'
- 'Gemfile.lock'
- '*.gemspec'
ChamberSecurity:
enabled: false
description: 'Checking that settings have been secured with Chamber'
required_executable: 'chamber'
flags: ['secure', '--files']
install_command: 'gem install chamber'
include:
- 'config/settings.yml'
- 'config/settings/**/*.yml'
CoffeeLint:
description: 'Analyzing with coffeelint'
required_executable: 'coffeelint'
flags: ['--quiet']
install_command: 'npm install -g coffeelint'
include: '**/*.coffee'
CssLint:
description: 'Analyzing with csslint'
required_executable: 'csslint'
flags: ['--quiet', '--format=compact']
install_command: 'npm install -g csslint'
include: '**/*.css'
EsLint:
description: 'Analyzing with ESLint'
required_executable: 'eslint'
flags: ['--format=compact']
install_command: 'npm install -g eslint'
include: '**/*.js'
GoLint:
description: 'Analyzing with golint'
required_executable: 'golint'
install_command: 'go get github.com/golang/lint/golint'
include: '**/*.go'
HamlLint:
description: 'Analyzing with haml-lint'
required_executable: 'haml-lint'
install_command: 'gem install haml-lint'
include: '**/*.haml'
HardTabs:
description: 'Checking for hard tabs'
quiet: true
required_executable: 'grep'
flags: ['-IHn', "\t"]
exclude:
- '**/*.go'
- '**/Makefile'
- '.gitmodules'
ImageOptim:
description: 'Checking for optimizable images'
include:
- '**/*.gif'
- '**/*.jpg'
- '**/*.jpeg'
- '**/*.png'
JavaCheckstyle:
description: 'Analyzing with checkstyle'
required_executable: 'checkstyle'
flags: ['-c', '/sun_checks.xml']
include: '**/*.java'
Jscs:
description: 'Analyzing with JSCS'
required_executable: 'jscs'
flags: ['--reporter=inline', '--verbose']
install_command: 'npm install -g jscs'
include: '**/*.js'
JsHint:
description: 'Analyzing with JSHint'
required_executable: 'jshint'
flags: ['--verbose']
install_command: 'npm install -g jshint'
include: '**/*.js'
JsonSyntax:
description: 'Validating JSON syntax'
include: '**/*.json'
LocalPathsInGemfile:
description: 'Checking for local paths in Gemfile'
required_executable: 'grep'
flags: ['-IHnE', '^[^#]*((\bpath:)|(:path\s*=>))']
include: '**/Gemfile'
MergeConflicts:
description: 'Checking for merge conflicts'
quiet: true
required_executable: 'grep'
flags: ['-IHn', '^<<<<<<<\s']
Pep257:
description: 'Analyzing docstrings with pep257'
required_executable: 'pep257'
install_command: 'pip install pep257'
include: '**/*.py'
Pep8:
enabled: false
description: 'Analyzing with pep8'
required_executable: 'pep8'
install_command: 'pip install pep8'
include: '**/*.py'
PryBinding:
description: 'Checking for instances of binding.pry'
quiet: true
include:
- '**/*.rb'
- '**/*.rake'
Pyflakes:
enabled: false
description: 'Analyzing with pyflakes'
required_executable: 'pyflakes'
install_command: 'pip install pyflakes'
include: '**/*.py'
PythonFlake8:
description: 'Analyzing with flake8'
required_executable: 'flake8'
install_command: 'pip install flake8'
include: '**/*.py'
RailsSchemaUpToDate:
description: 'Checking if database schema is up to date'
include:
- 'db/migrate/*.rb'
- 'db/schema.rb'
- 'db/structure.sql'
Reek:
enabled: false
description: 'Analyzing with Reek'
required_executable: 'reek'
flags: ['--single-line', '--no-color']
install_command: 'gem install reek'
include:
- '**/*.gemspec'
- '**/*.rake'
- '**/*.rb'
- '**/Gemfile'
- '**/Rakefile'
Rubocop:
description: 'Analyzing with Rubocop'
required_executable: 'rubocop'
flags: ['--format=emacs', '--force-exclusion']
install_command: 'gem install rubocop'
include:
- '**/*.gemspec'
- '**/*.rake'
- '**/*.rb'
- '**/Gemfile'
- '**/Rakefile'
Scalastyle:
description: 'Analyzing with Scalastyle'
required_executable: 'scalastyle'
include: '**/*.scala'
ScssLint:
description: 'Analyzing with scss-lint'
required_executable: 'scss-lint'
install_command: 'gem install scss-lint'
include: '**/*.scss'
SemiStandard:
enabled: false
description: 'Analyzing with semistandard'
required_executable: 'semistandard'
flags: ['--verbose']
install_command: 'npm install -g semistandard'
include: '**/*.js'
ShellCheck:
description: 'Analyzing with ShellCheck'
required_executable: 'shellcheck'
flags: ['--format=gcc']
include: '**/*.sh'
Standard:
enabled: false
description: 'Analyzing with standard'
required_executable: 'standard'
flags: ['--verbose']
install_command: 'npm install -g standard'
include: '**/*.js'
TrailingWhitespace:
description: 'Checking for trailing whitespace'
required_executable: 'grep'
flags: ['-IHn', '\s$']
exclude:
- '**/db/structure.sql'
TravisLint:
description: 'Checking Travis CI configuration'
required_executable: 'travis'
flags: ['lint']
install_command: 'gem install travis'
include: '.travis.yml'
W3cCss:
enabled: false
description: 'Analyzing with W3C CSS validation service'
validator_uri: 'http://jigsaw.w3.org/css-validator/validator'
language: 'en'
profile: 'css3'
warn_level: 2
include:
- '**/*.css'
W3cHtml:
enabled: false
description: 'Analyzing with W3C HTML validation service'
validator_uri: 'http://validator.w3.org/check'
charset: 'utf-8'
doctype: 'HTML5'
include:
- '**/*.html'
XmlLint:
description: 'Analyzing with xmllint'
required_executable: 'xmllint'
flags: ['--noout']
include: '**/*.xml'
YamlSyntax:
description: 'Checking YAML syntax'
include:
- '**/*.yaml'
- '**/*.yml'
# Hooks that run after HEAD changes or a file is explicitly checked out.
PostCheckout:
ALL:
required: false
quiet: false
IndexTags:
enabled: false
description: 'Generating tags file from source'
required_executable: 'ctags'
# Hooks that run after a commit is created.
PostCommit:
ALL:
requires_files: false
required: false
quiet: false
GitGuilt:
enabled: false
description: 'Calculating changes in blame since last commit'
requires_files: true
required_executable: 'git-guilt'
flags: ['HEAD~', 'HEAD']
install_command: 'npm install -g git-guilt'
IndexTags:
enabled: false
description: 'Generating tags file from source'
required_executable: 'ctags'
# Hooks that run after `git merge` executes successfully (no merge conflicts).
PostMerge:
ALL:
requires_files: false
quiet: false
IndexTags:
enabled: false
description: 'Generating tags file from source'
required_executable: 'ctags'
# Hooks that run after a commit is modified by an amend or rebase.
PostRewrite:
ALL:
requires_files: false
quiet: false
IndexTags:
enabled: false
description: 'Generating tags file from source'
required_executable: 'ctags'