minimum_pre_commit_version: 4.0.0
exclude: ^LICENSES/|\.(html|csv|svg)$
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"]
- id: check-added-large-files
- id: check-merge-conflict
- id: detect-private-key
- id: check-json
exclude: .*_runtime_kb\.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"
exclude: ^build/|tests/third_party/
- repo: https://gitcode.com/gh_mirrors/ru/ruff-pre-commit
rev: v0.14.14
hooks:
- id: ruff-check
args: ["--output-format", "github", "--fix", "--ignore", "F841,F821,E741,E712,F403,F405,F601,E721,E731,F811,E711,E722,E402,F401"]
types: [python]
- id: ruff-format
types: [python]
- repo: https://gitcode.com/gh_mirrors/co/codespell
rev: v2.4.1
hooks:
- id: codespell
args: [
"-L",
"CANN,cann,NNAL,nnal,ASCEND,ascend,EnQue,CopyIn,ArchType,AND,ND,tbe,copyin,alog,wIh,dout,indexs,inH,padD",
"--skip",
"*.cc,*.cjs,*.clang-format,*.cmake,*.cpp,*.csv,*.cts,*.gitignore,*.gitkeep,*.gitmodules,*.h,*.hpp,*.in,*.info,*.ini,*.js,*.json,*.log,*.md,*.py,*.sh,*.TAG,*.ts,*.txt,*.xml,*.yaml,*.yml",
]
- repo: local
hooks:
- id: oat-check
name: OAT Compliance Check
entry: bash scripts/oat_check.sh
language: system
pass_filenames: true
types: [file]
stages: [pre-commit]
verbose: true