default_stages: [commit] minimum_pre_commit_version: 2.4.0 repos: - repo: https://github.com/jorisroovers/gitlint rev: v0.19.1 hooks: - id: gitlint - repo: https://github.com/scop/pre-commit-shfmt rev: v3.8.0-1 hooks: - id: shfmt types: [text] files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|fallback/update-fallback-links|runLint|update-test-cmd-list)|.+\.sh(\.in)?)$ exclude: ^completions/(\.gitignore|Makefile.*)$ - repo: https://github.com/shellcheck-py/shellcheck-py rev: v0.10.0.1 hooks: - id: shellcheck args: [-f, gcc] types: [text] files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|fallback/update-fallback-links|runLint|update-test-cmd-list)|.+\.sh(\.in)?)$ exclude: ^completions/(\.gitignore|Makefile.*)$ require_serial: false # We disable SC1090 anyway, so parallel is ok - repo: local hooks: - id: update-test-cmd-list name: update-test-cmd-list language: script entry: test/update-test-cmd-list files: ^test/t/.+\.py$ pass_filenames: false - id: update-test-fallback-links name: update-test-fallback-links language: script entry: test/fallback/update-fallback-links files: ^completions/_ pass_filenames: false - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.4.3 hooks: - id: ruff types: [text] files: ^(helpers/python|.+\.py)$ exclude: ^completions/ - id: ruff-format types: [text] files: ^(helpers/python|.+\.py)$ exclude: ^completions/ - repo: local hooks: - id: mypy name: mypy language: python additional_dependencies: - venv-run==0.2.0 entry: venv-run mypy args: [--config-file=test/setup.cfg] types: [python] # Intentionally not run on helpers/python (we support very old versions) exclude: ^completions/|^test/fixtures/pytest/ - repo: https://github.com/perltidy/perltidy rev: "20240202" hooks: - id: perltidy types: [text] files: ^(helpers/perl|.+\.p[ml])$ - repo: https://github.com/scop/pre-commit-perlcritic rev: v1.144-1 hooks: - id: perlcritic args: [--quiet, --verbose, "5"] types: [text] files: ^(helpers/perl|.+\.p[ml])$ - repo: https://github.com/jackdewinter/pymarkdown rev: v0.9.19 hooks: - id: pymarkdown entry: pymarkdown args: - --config=.pymarkdown.json - scan exclude: ^CHANGELOG\.md$ - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: - id: check-case-conflict - repo: https://github.com/crate-ci/typos rev: v1.21.0 hooks: - id: typos exclude: ^(CHANGELOG\.md|test/(test-cmd-list\.txt|fixtures/.+))$