ci:
  autoupdate_commit_msg: "chore: update pre-commit hooks"
  autofix_commit_msg: "style: pre-commit fixes"

exclude: ^.cruft.json|.copier-answers.yml$

repos:
  - repo: https://github.com/adamchainz/blacken-docs
    rev: "1.18.0"
    hooks:
      - id: blacken-docs
        additional_dependencies: [black==24.*]

  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: "v5.0.0"
    hooks:
      - id: check-added-large-files
      - id: check-case-conflict
      - id: check-merge-conflict
      - id: check-symlinks
      - id: check-yaml
      - id: debug-statements
      - id: end-of-file-fixer
      - id: mixed-line-ending
      - id: name-tests-test
        args: ["--pytest-test-first"]
      - id: requirements-txt-fixer
      - id: trailing-whitespace

  - repo: https://github.com/pre-commit/pygrep-hooks
    rev: "v1.10.0"
    hooks:
      - id: rst-backticks
      - id: rst-directive-colons
      - id: rst-inline-touching-normal

  - repo: https://github.com/rbubley/mirrors-prettier
    rev: "v3.4.2"
    hooks:
      - id: prettier
        types_or: [yaml, markdown, html, css, scss, javascript, json]
        args: [--prose-wrap=always]

  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: "v0.8.2"
    hooks:
      - id: ruff-format
      - id: ruff
        args: ["--fix", "--show-fixes"]

  - repo: https://github.com/codespell-project/codespell
    rev: "v2.3.0"
    hooks:
      - id: codespell
        exclude: pixi.lock

  - repo: https://github.com/shellcheck-py/shellcheck-py
    rev: "v0.10.0.1"
    hooks:
      - id: shellcheck

  - repo: local
    hooks:
      - id: disallow-caps
        name: Disallow improper capitalization
        language: pygrep
        entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
        exclude: .pre-commit-config.yaml

  - repo: https://github.com/abravalheri/validate-pyproject
    rev: "v0.23"
    hooks:
      - id: validate-pyproject
        additional_dependencies: ["validate-pyproject-schema-store[all]"]

  - repo: https://github.com/python-jsonschema/check-jsonschema
    rev: "0.30.0"
    hooks:
      - id: check-github-workflows

  - repo: https://github.com/numpy/numpydoc
    rev: "v1.8.0"
    hooks:
      - id: numpydoc-validation
