Skip to content
Snippets Groups Projects
.pre-commit-config.yaml 1.5 KiB
Newer Older
Bastien Abadie's avatar
Bastien Abadie committed
repos:
Yoann Schneider's avatar
Yoann Schneider committed
  - repo: https://github.com/astral-sh/ruff-pre-commit
    # Ruff version.
    rev: v0.3.1
Bastien Abadie's avatar
Bastien Abadie committed
    hooks:
      # Run the linter.
Yoann Schneider's avatar
Yoann Schneider committed
      - id: ruff
        args: [--fix, --exit-non-zero-on-fix]
        exclude: "^worker-{{cookiecutter.slug}}/"
      # Run the formatter.
      - id: ruff-format
        exclude: "^worker-{{cookiecutter.slug}}/"
Bastien Abadie's avatar
Bastien Abadie committed
  - repo: https://github.com/pre-commit/pre-commit-hooks
Bastien Abadie's avatar
Bastien Abadie committed
    hooks:
      - id: check-ast
      - id: check-executables-have-shebangs
      - id: check-merge-conflict
      - id: check-symlinks
      - id: debug-statements
      - id: trailing-whitespace
      - id: check-yaml
        args: [--allow-multiple-documents]
        exclude: "^worker-{{cookiecutter.slug}}/.arkindex.yml$|^mkdocs.yml$"
Bastien Abadie's avatar
Bastien Abadie committed
      - id: mixed-line-ending
      - id: name-tests-test
        args: ['--django']
      - id: check-json
      - id: check-toml
        exclude: "^worker-{{cookiecutter.slug}}/pyproject.toml$"
Bastien Abadie's avatar
Bastien Abadie committed
      - id: requirements-txt-fixer
  - repo: https://github.com/codespell-project/codespell
Bastien Abadie's avatar
Bastien Abadie committed
    hooks:
      - id: codespell
        args: ['--write-changes']
  - repo: https://github.com/igorshubovych/markdownlint-cli
    rev: v0.39.0
Erwan Rouchet's avatar
Erwan Rouchet committed
    hooks:
      - id: markdownlint
        args: ['--fix', '--disable', 'MD013', 'MD046', '--']
Bastien Abadie's avatar
Bastien Abadie committed
  - repo: meta
    hooks:
      - id: check-useless-excludes
  - repo: https://github.com/shellcheck-py/shellcheck-py
    rev: v0.10.0.1
    hooks:
      - id: shellcheck
        exclude: "^worker-{{cookiecutter.slug}}/ci/build.sh$"