ci:
  autofix_prs: false
  autoupdate_commit_msg: "pre-commit: bump repositories"

exclude: ^tests/packages/broken_license/LICENSE$

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: check-ast
      - id: check-builtin-literals
      - id: check-docstring-first
      - id: check-merge-conflict
      - id: check-yaml
      - id: check-toml
      - id: debug-statements
      - id: end-of-file-fixer
      - id: trailing-whitespace

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

  - 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/adamchainz/blacken-docs
    rev: 1.19.1
    hooks:
      - id: blacken-docs
        additional_dependencies: [black==24.*]

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

  - repo: https://github.com/henryiii/check-sdist
    rev: "v1.2.0"
    hooks:
      - id: check-sdist
        args: [--inject-junk]
        additional_dependencies:
          - flit-core

  - repo: https://github.com/codespell-project/codespell
    rev: v2.4.1
    hooks:
      - id: codespell
        exclude: ^(LICENSE$|src/scikit_build_core/resources/find_python|tests/test_skbuild_settings.py$)

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

  - repo: https://github.com/henryiii/validate-pyproject-schema-store
    rev: 2025.03.03
    hooks:
      - id: validate-pyproject

  - repo: https://github.com/python-jsonschema/check-jsonschema
    rev: 0.31.3
    hooks:
      - id: check-dependabot
      - id: check-github-workflows
      - id: check-readthedocs
      - id: check-metaschema
        files: \.schema\.json

  - repo: https://github.com/scientific-python/cookie
    rev: 2025.01.22
    hooks:
      - id: sp-repo-review
