-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.pre-commit-config.yaml
81 lines (73 loc) · 2.09 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
72
73
74
75
76
77
78
79
80
81
---
# 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:
- --mapping=2
- --sequence=4
- --offset=2
- --width=1200 # match .yamllint.yaml; we don't care about line-length.
exclude: repocop.yaml
- 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.16
hooks:
- id: forbid-binary
# Exclude png and server.zip forbid, we can check these in.
exclude: ^.+\.(png|server\.zip)$
# 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/PyCQA/pylint
rev: pylint-2.6.0
hooks:
- id: pylint
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
args:
- --skip-string-normalization