|
| 1 | +--- |
| 2 | +# See https://pre-commit.com for more information |
| 3 | +# See https://pre-commit.com/hooks.html for more hooks |
| 4 | + |
| 5 | +# ignore: |
| 6 | +# vendor'd code (that has vendor in its path) |
| 7 | +exclude: vendor |
| 8 | + |
| 9 | +repos: |
| 10 | + - repo: https://github.com/adrienverge/yamllint |
| 11 | + rev: v1.25.0 |
| 12 | + hooks: |
| 13 | + - id: yamllint |
| 14 | + args: |
| 15 | + - --format=parsable |
| 16 | + - --strict |
| 17 | + |
| 18 | + - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt |
| 19 | + rev: 0.1.0 # or higher tag |
| 20 | + hooks: |
| 21 | + - id: yamlfmt |
| 22 | + args: |
| 23 | + - --mapping=2 |
| 24 | + - --sequence=4 |
| 25 | + - --offset=2 |
| 26 | + - --width=1200 # match .yamllint.yaml; we don't care about line-length. |
| 27 | + exclude: repocop.yaml |
| 28 | + |
| 29 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 30 | + rev: v3.3.0 |
| 31 | + hooks: |
| 32 | + - id: check-added-large-files |
| 33 | + - id: check-byte-order-marker |
| 34 | + - id: check-case-conflict |
| 35 | + - id: check-executables-have-shebangs |
| 36 | + - id: check-json |
| 37 | + - id: check-merge-conflict |
| 38 | + - id: check-symlinks |
| 39 | + - id: detect-private-key |
| 40 | + - id: end-of-file-fixer |
| 41 | + - id: forbid-new-submodules |
| 42 | + - id: mixed-line-ending |
| 43 | + - id: pretty-format-json |
| 44 | + args: |
| 45 | + - --autofix |
| 46 | + - id: trailing-whitespace |
| 47 | + |
| 48 | + - repo: https://github.com/syntaqx/git-hooks |
| 49 | + rev: v0.0.16 |
| 50 | + hooks: |
| 51 | + - id: forbid-binary |
| 52 | + # Exclude png and server.zip forbid, we can check these in. |
| 53 | + exclude: ^.+\.(png|server\.zip)$ |
| 54 | + # See checks in shellcheck wiki: https://github.com/koalaman/shellcheck/wiki/ |
| 55 | + - id: shellcheck |
| 56 | + - id: shfmt |
| 57 | + # do not use these args (yet): |
| 58 | + # -s, simplify code |
| 59 | + # -mn, minify to reduce its size |
| 60 | + args: |
| 61 | + - -w # autofix in place |
| 62 | + - -d # show diff |
| 63 | + - -i=2 # indent 2 spaces |
| 64 | + |
| 65 | + - repo: https://github.com/PyCQA/pylint |
| 66 | + rev: pylint-2.6.0 |
| 67 | + hooks: |
| 68 | + - id: pylint |
| 69 | + |
| 70 | + - repo: https://gitlab.com/pycqa/flake8 |
| 71 | + rev: 3.8.4 |
| 72 | + hooks: |
| 73 | + - id: flake8 |
| 74 | + |
| 75 | + - repo: https://github.com/psf/black |
| 76 | + rev: 20.8b1 |
| 77 | + hooks: |
| 78 | + - id: black |
| 79 | + args: |
| 80 | + - --skip-string-normalization |
0 commit comments