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

repos:
  - repo: https://gitlab.cern.ch/pre-commit-hook-mirrors/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: requirements-txt-fixer
      - id: trailing-whitespace

  - repo: https://gitlab.cern.ch/pre-commit-hook-mirrors/kynan/nbstripout
    rev: 0.8.0
    hooks:
      - id: nbstripout
        types_or: [jupyter]

  - repo: https://gitlab.cern.ch/pre-commit-hook-mirrors/pre-commit/mirrors-clang-format
    rev: v19.1.3
    hooks:
      - id: clang-format
        types_or: [c++, c, cuda]

  - repo: https://gitlab.cern.ch/pre-commit-hook-mirrors/psf/black-pre-commit-mirror
    rev: 24.10.0 # Use the latest stable version
    hooks:
      - id: black-jupyter

  - repo: https://github.com/charliermarsh/ruff-pre-commit
    rev: v0.7.3 # Use the latest version
    hooks:
      - id: ruff
        args: ["--fix", "--show-fixes"]

  - repo: https://github.com/cheshirekow/cmake-format-precommit
    rev: v0.6.13
    hooks:
      - id: cmake-format
        types: [file]
        files: (\.cmake|CMakeLists.txt)(.in)?$

  # - repo: https://gitlab.cern.ch/pre-commit-hook-mirrors/codespell-project/codespell
  #   rev: v
  #   hooks:
  #     - id: codespell
  #       args: ["-L", "sur,falsy,gaus,hist,lsit,nd,parms,retur,ue,ba,claus,fo"]

  # - repo: https://gitlab.cern.ch/pre-commit-hook-mirrors/pre-commit/pygrep-hooks
  #   rev: v
  #   hooks:
  #     - id: rst-backticks
  #     - id: rst-directive-colons
  #     - id: rst-inline-touching-normal

  # - repo: https://gitlab.cern.ch/pre-commit-hook-mirrors/shellcheck-py/shellcheck-py
  #   rev: v0.9.0.5
  #   hooks:
  #     - id: shellcheck
  #       stages: [manual]
