Skip to content
Snippets Groups Projects
.pre-commit-config.yaml 1.16 KiB
Newer Older
Xuefeng Ding's avatar
Xuefeng Ding committed
ci:
  autoupdate_commit_msg: "chore: update pre-commit hooks"
  autofix_commit_msg: "style: pre-commit fixes"
Xuefeng Ding's avatar
Xuefeng Ding committed
  autoupdate_schedule: monthly
Xuefeng Ding's avatar
Xuefeng Ding committed

Xuefeng Ding's avatar
Xuefeng Ding committed
repos:
Xuefeng Ding's avatar
Xuefeng Ding committed
  - repo: https://github.com/pre-commit/pre-commit-hooks
Xuefeng Ding's avatar
Xuefeng Ding committed
    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

Xuefeng Ding's avatar
Xuefeng Ding committed
  - repo: https://github.com/kynan/nbstripout
Xuefeng Ding's avatar
Xuefeng Ding committed
    rev: 0.8.0
Xuefeng Ding's avatar
Xuefeng Ding committed
    hooks:
      - id: nbstripout
Xuefeng Ding's avatar
Xuefeng Ding committed
        types_or: [jupyter]
Xuefeng Ding's avatar
Xuefeng Ding committed

Xuefeng Ding's avatar
Xuefeng Ding committed
  - repo: https://github.com/pre-commit/mirrors-clang-format
Xuefeng Ding's avatar
Xuefeng Ding committed
    rev: v19.1.3
    hooks:
      - id: clang-format
Xuefeng Ding's avatar
Xuefeng Ding committed
        types_or: [c++, c, cuda]
Xuefeng Ding's avatar
Xuefeng Ding committed

Xuefeng Ding's avatar
Xuefeng Ding committed
  - repo: https://github.com/charliermarsh/ruff-pre-commit
Xuefeng Ding's avatar
Xuefeng Ding committed
    rev: v0.7.4 # Use the latest version
Xuefeng Ding's avatar
Xuefeng Ding committed
    hooks:
      - id: ruff
Xuefeng Ding's avatar
Xuefeng Ding committed
        args: ["--fix", "--show-fixes"]
Xuefeng Ding's avatar
Xuefeng Ding committed
      - id: ruff-format
Xuefeng Ding's avatar
Xuefeng Ding committed

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