forked from kvcache-ai/Mooncake
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
54 lines (47 loc) · 1.79 KB
/
.pre-commit-config.yaml
File metadata and controls
54 lines (47 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Pre-commit hooks configuration for Mooncake
# Install: pip install -r requirements-dev.txt && pre-commit install
# Run manually: pre-commit run --all-files
# Note: clang-format should already be available (installed via system packages or dependencies.sh)
# Exclusions: build artifacts, vendored extern code, generated wheels.
minimum_pre_commit_version: '3.6.0'
ci:
autofix_prs: true
autoupdate_commit_msg: 'chore: pre-commit autoupdate'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
exclude: '^(build/|extern/|mooncake-wheel/repaired_wheels_.*|.*/build/|FAST25-release/)'
- id: end-of-file-fixer
exclude: '^(build/|extern/|mooncake-wheel/repaired_wheels_.*|.*/build/|FAST25-release/)'
- id: check-yaml
- id: check-merge-conflict
- id: check-added-large-files
args: ['--maxkb=1024']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
args: ['--fix']
exclude: '^(extern/|FAST25-release/)'
- id: ruff-format
exclude: '^(extern/|FAST25-release/)'
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
exclude: '^(extern/|FAST25-release/)'
args: ['--ignore-words-list=te,mooncake,KVCache']
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.8
hooks:
- id: clang-format
files: '\.(c|cc|cpp|cxx|h|hpp)$'
exclude: '^(extern/|build/|.*/build/|FAST25-release/|.*/thirdparty/.*)'
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
files: 'CMakeLists\.txt|.*\.cmake'
exclude: '^(extern/|build/|.*/build/|FAST25-release/)'