aboutsummaryrefslogtreecommitdiff
path: root/.overcommit.yml
blob: d367adaea3a7e9f4ed6ad7471d1d03c4e5bbc595 (plain)
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
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
#
# Hooks are only enabled if you take action.
#
# To enable the hooks run:
#
# ```
# bundle exec overcommit --install
# # ensure .overcommit.yml does not harm to you and then
# bundle exec overcommit --sign
# ```
#
# (it will manage the .git/hooks directory):
#
# Examples howto skip a test for a commit or push:
#
# ```
# SKIP=RuboCop git commit
# SKIP=PuppetLint git commit
# SKIP=RakeTask git push
# ```
#
# Don't invoke overcommit at all:
#
# ```
# OVERCOMMIT_DISABLE=1 git commit
# ```
#
# Read more about overcommit: https://github.com/brigade/overcommit
#
# To manage this config yourself in your module add
#
# ```
# .overcommit.yml:
#   unmanaged: true
# ```
#
# to your modules .sync.yml config
---
PreCommit:
  RuboCop:
    enabled: true
    description: 'Runs rubocop on modified files only'
    command: ['bundle', 'exec', 'rubocop']
  PuppetLint:
    enabled: true
    description: 'Runs puppet-lint on modified files only'
    command: ['bundle', 'exec', 'puppet-lint']
  YamlSyntax:
    enabled: true
  JsonSyntax:
    enabled: true
  TrailingWhitespace:
    enabled: true

PrePush:
  RakeTarget:
    enabled: true
    description: 'Run rake targets'
    targets:
      - 'validate'
      - 'test'
      - 'rubocop'
    command: ['bundle', 'exec', 'rake']