| # We use poetry to run formatting and linting before commit/push | |
| # Longer checks such as tests, security and complexity baseline | |
| # are run as part of CI to prevent slower feedback loop | |
| # All checks can be run locally via `make pr` | |
| repos: | |
| - repo: https://github.com/pre-commit/pre-commit-hooks | |
| rev: "f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9" # v4.4.0 | |
| hooks: | |
| - id: check-merge-conflict | |
| - id: trailing-whitespace | |
| - id: check-toml | |
| - repo: local | |
| hooks: | |
| - id: black | |
| name: formatting::black | |
| entry: poetry run black | |
| language: system | |
| types: [python] | |
| - id: ruff | |
| name: linting-format::ruff | |
| entry: poetry run ruff check | |
| language: system | |
| types: [python] | |
| - repo: https://github.com/igorshubovych/markdownlint-cli | |
| rev: "ce0d77ac47dc921b62429804fe763d4d35f66a76" # v0.34.0 | |
| hooks: | |
| - id: markdownlint-docker | |
| args: ["--fix"] | |
| - repo: local | |
| hooks: | |
| - id: cloudformation | |
| name: linting::cloudformation | |
| entry: poetry run cfn-lint | |
| language: system | |
| types: [yaml] | |
| exclude: examples/homepage/install/.*?/serverless\.yml$ | |
| files: examples/.* | |
| - repo: https://github.com/rhysd/actionlint | |
| rev: "fd7ba3c382e13dcc0248e425b4cbc3f1185fa3ee" # v1.6.24 | |
| hooks: | |
| - id: actionlint-docker | |
| args: [-pyflakes=] | |
| - repo: https://github.com/antonbabenko/pre-commit-terraform | |
| rev: 3420134c37197c21edffc7e6093b14ffae8402f2 # v1.81.0 | |
| hooks: | |
| - id: terraform_fmt | |
| args: | |
| - --args=-recursive | |
| - repo: https://github.com/gitleaks/gitleaks | |
| rev: "7804d652c0460f0b61ea9bb2c1f202bfcdbbf144" # v8.16.3 | |
| hooks: | |
| - id: gitleaks | |