|
| 1 | +fail_fast: false |
| 2 | +exclude: '^.venv/.*' |
| 3 | +default_install_hook_types: [pre-commit, pre-push, commit-msg, prepare-commit-msg] |
| 4 | +default_stages: [pre-commit] |
| 5 | +repos: |
| 6 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 7 | + rev: v5.0.0 |
| 8 | + hooks: |
| 9 | + - id: check-ast |
| 10 | + - id: check-toml |
| 11 | + - id: check-yaml |
| 12 | + exclude: | |
| 13 | + (?x)(^helm/.*/templates) |
| 14 | + - id: check-json |
| 15 | + - id: end-of-file-fixer |
| 16 | + - id: fix-byte-order-marker |
| 17 | + - id: trailing-whitespace |
| 18 | + - id: check-executables-have-shebangs |
| 19 | + - id: check-symlinks |
| 20 | + - id: destroyed-symlinks |
| 21 | + - id: mixed-line-ending |
| 22 | + - id: detect-aws-credentials |
| 23 | + - id: detect-private-key |
| 24 | + - id: fix-byte-order-marker |
| 25 | + - id: requirements-txt-fixer |
| 26 | + |
| 27 | + - repo: local |
| 28 | + hooks: |
| 29 | + - id: black |
| 30 | + name: black |
| 31 | + entry: make black |
| 32 | + language: system |
| 33 | + types_or: [python, pyi, jupyter] |
| 34 | + pass_filenames: false |
| 35 | + - id: ruff |
| 36 | + name: ruff |
| 37 | + entry: make ruff |
| 38 | + language: system |
| 39 | + types_or: [python, pyi, jupyter] |
| 40 | + pass_filenames: false |
| 41 | + - id: mypy |
| 42 | + name: mypy |
| 43 | + entry: make mypy |
| 44 | + language: system |
| 45 | + types_or: [python, pyi, jupyter] |
| 46 | + pass_filenames: false |
| 47 | + - id: trivy |
| 48 | + name: trivy |
| 49 | + entry: make tf-trivy |
| 50 | + language: system |
| 51 | + files: \.tf(vars)?$ |
| 52 | + pass_filenames: false |
| 53 | + - id: tf-format |
| 54 | + name: tf-format |
| 55 | + entry: make tf-format |
| 56 | + language: system |
| 57 | + files: (\.tf|\.tfvars)$ |
| 58 | + exclude: \.terraform/.*$ |
| 59 | + pass_filenames: false |
| 60 | + - id: tf-lint |
| 61 | + name: tf-lint |
| 62 | + entry: make tf-lint |
| 63 | + language: system |
| 64 | + files: (\.tf|\.tfvars)$ |
| 65 | + exclude: \.terraform/.*$ |
| 66 | + pass_filenames: false |
| 67 | + - id: shellcheck |
| 68 | + name: shellcheck |
| 69 | + entry: make shellcheck |
| 70 | + language: system |
| 71 | + files: (\.sh)$ |
| 72 | + pass_filenames: false |
| 73 | + - id: ansible-lint |
| 74 | + name: ansible-lint |
| 75 | + entry: make ansible-lint |
| 76 | + language: system |
| 77 | + files: (.*/)?ansible/.*(\.yml)$ |
| 78 | + pass_filenames: false |
| 79 | + - id: hadolint |
| 80 | + name: docker lint |
| 81 | + entry: make hadolint |
| 82 | + language: system |
| 83 | + files: (/Dockerfile)$ |
| 84 | + pass_filenames: false |
| 85 | + - id: secrets |
| 86 | + name: git secrets |
| 87 | + entry: scripts/check-secrets.sh |
| 88 | + language: script |
| 89 | + pass_filenames: false |
| 90 | + - id: secrets-commit-msg |
| 91 | + name: git secrets check commit message |
| 92 | + entry: scripts/check-secrets.sh commit-msg |
| 93 | + language: system |
| 94 | + stages: [commit-msg] |
| 95 | + - id: secrets-prep-commit-msg |
| 96 | + name: git secrets pre check commit message |
| 97 | + entry: scripts/check-secrets.sh commit-msg |
| 98 | + language: system |
| 99 | + stages: [prepare-commit-msg] |
| 100 | + - id: commit-msg |
| 101 | + name: validate commit message contains a ticket |
| 102 | + language: pygrep |
| 103 | + entry: '(?i)\A(?!(odin|mesh|obs|spinecore)-[0-9]+)' |
| 104 | + args: [--multiline] |
| 105 | + stages: [commit-msg] |
| 106 | + types: [text] |
0 commit comments