repos:
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.16.1
    hooks:
      - id: ruff-check
        args: [--exit-non-zero-on-fix]

  - repo: https://github.com/psf/black-pre-commit-mirror
    rev: 26.5.1
    hooks:
      - id: black

  - repo: https://github.com/PyCQA/bandit
    rev: 1.9.4
    hooks:
    - id: bandit
      args: [--severity-level=high]
      files: ^src/

  - repo: https://github.com/Lucas-C/pre-commit-hooks
    rev: v1.5.6
    hooks:
      - id: remove-tabs
        exclude: (Makefile$|\.bat$|\.cmake$|\.eps$|\.fits$|\.gd$|\.opt$|\.patch$)

  - repo: https://github.com/pre-commit/mirrors-clang-format
    rev: v22.1.8
    hooks:
      - id: clang-format
        types: [c]
        exclude: ^src/thirdparty/

  - repo: https://github.com/pre-commit/pygrep-hooks
    rev: v1.10.0
    hooks:
      - id: rst-backticks

  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: check-case-conflict
      - id: check-executables-have-shebangs
      - id: check-shebang-scripts-are-executable
      - id: check-merge-conflict
      - id: check-json
      - id: check-toml
      - id: check-yaml
        args: [--allow-multiple-documents]
      - id: end-of-file-fixer
        exclude: ^Tests/images/|\.patch$
      - id: file-contents-sorter
        files: .github/workflows/Brewfile
      - id: trailing-whitespace
        exclude: ^\.github/.*TEMPLATE|^Tests/(fonts|images)/|\.patch$

  - repo: https://github.com/python-jsonschema/check-jsonschema
    rev: 0.37.4
    hooks:
      - id: check-github-workflows
      - id: check-readthedocs
      - id: check-renovate

  - repo: https://github.com/zizmorcore/zizmor-pre-commit
    rev: v1.29.0
    hooks:
      - id: zizmor

  - repo: https://github.com/sphinx-contrib/sphinx-lint
    rev: v1.0.2
    hooks:
      - id: sphinx-lint

  - repo: https://github.com/tox-dev/pyproject-fmt
    rev: v2.26.0
    hooks:
      - id: pyproject-fmt

  - repo: https://github.com/abravalheri/validate-pyproject
    rev: v0.25
    hooks:
      - id: validate-pyproject
        additional_dependencies: [trove-classifiers>=2024.10.12]

  - repo: https://github.com/tox-dev/tox-ini-fmt
    rev: 1.8.1
    hooks:
      - id: tox-ini-fmt

  - repo: https://github.com/regebro/pyroma
    rev: 5.1b1
    hooks:
      - id: pyroma
        additional_dependencies: [check-manifest]
        stages: [manual]

  - repo: meta
    hooks:
      - id: check-hooks-apply
      - id: check-useless-excludes

ci:
  autoupdate_schedule: monthly
