-
Notifications
You must be signed in to change notification settings - Fork 14
/
.pre-commit-config.yaml
71 lines (65 loc) · 1.96 KB
/
.pre-commit-config.yaml
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
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# ignore:
# vendor'd code (that has vendor in its path)
exclude: vendor
repos:
- repo: https://github.com/adrienverge/yamllint
rev: v1.25.0
hooks:
- id: yamllint
args:
- --format=parsable
- --strict
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.1.0 # or higher tag
hooks:
- id: yamlfmt
args:
- --preserve-quotes
- --mapping=2
- --sequence=4
- --offset=2
- --width=1200 # match .yamllint.yaml; we don't care about line-length.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
- id: check-added-large-files
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: forbid-new-submodules
- id: mixed-line-ending
- id: pretty-format-json
args:
- --autofix
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/syntaqx/git-hooks
rev: v0.0.17
hooks:
- id: forbid-binary
# See checks in shellcheck wiki: https://github.com/koalaman/shellcheck/wiki/
- id: shellcheck
- id: shfmt
# do not use these args (yet):
# -s, simplify code
# -mn, minify to reduce its size
args:
- -w # autofix in place
- -d # show diff
- -i=2 # indent 2 spaces
- repo: https://github.com/ansible/ansible-lint
rev: v4.3.5
hooks:
- id: ansible-lint
args:
# excludes
# 106 is deprecated. https://ansible-lint.readthedocs.io/en/latest/default_rules.html#role-name-does-not-match-a-z-a-z0-9-pattern
- -x=106