This repository has been archived by the owner on Jul 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.overcommit.yml
113 lines (97 loc) · 2.73 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
CommitMsg:
ALL:
requires_files: false
quiet: false
EmptyMessage:
enabled: true
description: 'Check for empty commit message'
quiet: true
ForbiddenBranches:
enabled: true
description: 'Do not commit directly to these branches, use Pull Requests'
branch_patterns:
- master
- develop
TextWidth:
enabled: true
description: 'Check text width'
max_subject_width: 60
min_subject_width: 0
max_body_width: 72
TrailingPeriod:
enabled: true
description: 'Check for trailing periods in subject'
PreCommit:
ALL:
on_warn: fail
AuthorEmail:
enabled: true
description: 'Check author email'
requires_files: false
required: true
quiet: true
pattern: '^[^@]+@.*$'
AuthorName:
enabled: true
description: 'Check for author name'
requires_files: false
required: true
quiet: true
BundleCheck:
enabled: true
description: 'Check Gemfile dependencies'
required_executable: 'bundle'
flags: ['check']
install_command: 'gem install bundler'
include:
- 'Gemfile'
- 'Gemfile.lock'
- '*.gemspec'
BundleAudit:
enabled: true
description: 'Check for vulnerable versions of gems'
required_executable: 'bundle-audit'
install_command: 'gem install bundler-audit'
Brakeman:
enabled: true
command: ['bundle', 'exec', 'brakeman']
Fasterer:
enabled: true
description: 'Analyzing for potential speed improvements'
required_executable: 'fasterer'
install_command: 'gem install fasterer'
include: '/*.rb'
command: ['bundle', 'exec', 'fasterer']
GenerateGraphQLSchema:
enabled: true
command: ['bundle', 'exec', 'rake graphql:schema:idl && git add schema.graphql']
MergeConflicts:
enabled: true
description: 'Check for merge conflicts'
quiet: true
required_executable: 'grep'
flags: ['-IHn', "^<<<<<<<[ \t]"]
RailsBestPractices:
enabled: true
description: 'Analyze with RailsBestPractices'
required_executable: 'rails_best_practices'
flags: ['--without-color']
install_command: 'gem install rails_best_practices'
command: ['bundle', 'exec', 'rails_best_practices', '.', '-c', 'config/rails_best_practices.yml']
RuboCop:
enabled: true
description: 'Analyze with RuboCop'
required_executable: 'rubocop'
flags: ['--format=emacs', '--force-exclusion', '--display-cop-names']
install_command: 'gem install rubocop'
include:
- '/*.gemspec'
- '/*.rake'
- '/*.rb'
- '/*.ru'
- '/Gemfile'
- '**/Rakefile'
command: ['bundle', 'exec', 'rubocop']
UpdateModelAnnotations:
enabled: true
command: ['bundle', 'exec', 'annotate --models && git add app/models spec/factories']