|
| 1 | +# Copyright (c) 2025, NVIDIA CORPORATION. |
| 2 | +ci: |
| 3 | + autofix_commit_msg: | |
| 4 | + [pre-commit.ci] auto code formatting |
| 5 | + autofix_prs: false |
| 6 | + autoupdate_branch: '' |
| 7 | + autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' |
| 8 | + autoupdate_schedule: quarterly |
| 9 | + skip: [] |
| 10 | + submodules: false |
| 11 | + |
| 12 | +repos: |
| 13 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 14 | + rev: v5.0.0 |
| 15 | + hooks: |
| 16 | + - id: end-of-file-fixer |
| 17 | + - id: mixed-line-ending |
| 18 | + - id: trailing-whitespace |
| 19 | + - repo: https://github.com/pre-commit/mirrors-clang-format |
| 20 | + rev: v19.1.6 |
| 21 | + hooks: |
| 22 | + - id: clang-format |
| 23 | + types_or: [file] |
| 24 | + files: | |
| 25 | + (?x)^( |
| 26 | + ^.*\.c$| |
| 27 | + ^.*\.cpp$| |
| 28 | + ^.*\.cu$| |
| 29 | + ^.*\.cuh$| |
| 30 | + ^.*\.cxx$| |
| 31 | + ^.*\.h$| |
| 32 | + ^.*\.hpp$| |
| 33 | + ^.*\.inl$| |
| 34 | + ^.*\.mm$ |
| 35 | + ) |
| 36 | + args: ["-fallback-style=none", "-style=file", "-i"] |
| 37 | + |
| 38 | + # TODO/REMINDER: add the Ruff vscode extension to the devcontainers |
| 39 | + # Ruff, the Python auto-correcting linter/formatter written in Rust |
| 40 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 41 | + rev: v0.8.6 |
| 42 | + hooks: |
| 43 | + - id: ruff # linter |
| 44 | + - id: ruff-format # formatter |
| 45 | + |
| 46 | + # TOML lint & format |
| 47 | + - repo: https://github.com/ComPWA/taplo-pre-commit |
| 48 | + rev: v0.9.3 |
| 49 | + hooks: |
| 50 | + # See https://github.com/NVIDIA/cccl/issues/3426 |
| 51 | + # - id: taplo-lint |
| 52 | + # exclude: "^docs/" |
| 53 | + - id: taplo-format |
| 54 | + exclude: "^docs/" |
| 55 | + |
| 56 | + - repo: https://github.com/codespell-project/codespell |
| 57 | + rev: v2.3.0 |
| 58 | + hooks: |
| 59 | + - id: codespell |
| 60 | + additional_dependencies: [tomli] |
| 61 | + args: ["--toml", "pyproject.toml"] |
| 62 | + exclude: | |
| 63 | + (?x)^( |
| 64 | + build| |
| 65 | + CITATION.md |
| 66 | + ) |
| 67 | +
|
| 68 | +
|
| 69 | + - repo: https://github.com/pre-commit/mirrors-mypy |
| 70 | + rev: 'v1.14.1' |
| 71 | + hooks: |
| 72 | + - id: mypy |
| 73 | + additional_dependencies: [types-cachetools, numpy] |
| 74 | + args: ["--config-file=python/cuda_parallel/pyproject.toml", |
| 75 | + "python/cuda_parallel/cuda/"] |
| 76 | + pass_filenames: false |
| 77 | + |
| 78 | + |
| 79 | +default_language_version: |
| 80 | + python: python3 |
0 commit comments