ci:
  autofix_prs: false
  autofix_commit_msg: "style: pre-commit fixes"
  autoupdate_commit_msg: "pre-commit: bump repositories"
  autoupdate_schedule: "monthly"

exclude: ^tests/packages/broken_license/LICENSE$

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.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.14.14"
    hooks:
      - id: ruff-check
        args: ["--fix"]
      - 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.20.0
    hooks:
      - id: blacken-docs
        additional_dependencies: [black==25.*]

  - repo: https://github.com/rbubley/mirrors-prettier
    rev: "v3.8.1"
    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.3.2"
    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.11.0.1
    hooks:
      - id: shellcheck

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

  - repo: https://github.com/python-jsonschema/check-jsonschema
    rev: 0.36.1
    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.11.21
    hooks:
      - id: sp-repo-review
