minimum_pre_commit_version: 4.0.0
exclude: ^LICENSES/|\.(html|csv|svg)$|^\.[^/]+/|(^|/)build/|(^|/)tests/|(^|/)3rdparty/|^experimental/|^tools/
default_stages: [pre-commit]
ci:
autofix_prs: false
autoupdate_schedule: monthly
repos:
- repo: https://gitcode.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: ["--allow-multiple-documents"]
exclude: ^mkdocs\.yml$
- id: check-added-large-files
- id: check-merge-conflict
- id: detect-private-key
- id: check-json
- repo: https://gitcode.com/pre-commit-clang/mirrors-clang-format
rev: v18.1.8
hooks:
- id: clang-format
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|asc)$
args:
- "--style=file"
- "--verbose"
- "-i"
- repo: https://gitcode.com/gh_mirrors/ru/ruff-pre-commit
rev: v0.14.14
hooks:
- id: ruff-check
args: ["--output-format", "github", "--fix", "--line-length", "120"]
types: [python]
exclude: gen_data.py
- id: ruff-format
types: [python]
exclude: gen_data.py
- repo: local
hooks:
- id: check-unrelated-npu-model
name: check-unrelated-npu-model
language: pygrep
entry: '[Aa]scend(?:910_93|950(?:DT|PR))[A-Za-z0-9_]+'
types: [text]
exclude: |
(?x)^(
python/tla_dsl/catlass/execution\.py|
python/tla_dsl/csrc/mlir/lib/Passes/PassesCommon\.h|
python/tla_dsl/docs/zh/bc-backend-integration\.md|
python/tla_dsl/docs/zh/evaluation/dsl_performance_tools\.md
)$