forked from department-of-veterans-affairs/vets-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.overcommit.yml
76 lines (64 loc) · 1.79 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
PreCommit:
# Check if local Gemfile.lock matches Gemfile when either changes, unless
# Gemfile.lock is ignored by git.
BundleCheck:
enabled: true
# Warns if any TODO or FIXMEs are added.
FixMe:
enabled: true
# Disallows commits on these branches. Always work in a branch!
ForbiddenBranches:
enabled: true
branch_patterns:
- 'master'
- 'production'
- 'release-*'
# Disallow local filesystem paths in the Gemfile
LocalPathsInGemfile:
enabled: true
# Check for internal VA addresses in new commits
InternalAddresses:
enabled: true
# Re-run rubocop before allowing a commit to cut down on 'lint fix' commits
RuboCop:
enabled: true
on_warn: fail # Treat all warnings as failures
command: ['bundle', 'exec', 'rubocop', '-r', 'rubocop-thread_safety']
exclude:
- 'Gemfile'
# Warn on trailing whitespace, which Rubocop may also catch.
TrailingWhitespace:
enabled: true
exclude:
- '**/db/structure.sql' # Ignore trailing whitespace in generated files
- '**/*.yml'
- '**/*.yml.example'
- '**/*.md'
- 'spec/fixtures/**/*'
# Ensures YAMLs are valid
YamlSyntax:
enabled: true
PrePush:
# Prevents destructive updates to specified branches.
ProtectedBranches:
enabled: true
branch_patterns:
- 'master'
- 'production'
- 'release-*'
# Re-run Brakeman before pushing, as it's quick.
Brakeman:
enabled: true
command: ['bundle', 'exec', 'brakeman']
PostCheckout:
ALL:
quiet: true
# Run `bundle install` if the Gemfile or Gemfile lock change during a checkout
BundleInstall:
enabled: true
quiet: false
PostRewrite:
# Run `bundle install` if the Gemfile or Gemfile lock change during a checkout
BundleInstall:
enabled: true
quiet: false