forked from pegainfer-project/pegainfer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
50 lines (48 loc) · 1.87 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
50 lines (48 loc) · 1.87 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
repos:
- repo: builtin
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-toml
- id: check-added-large-files
args: [--maxkb, "500"]
- id: check-merge-conflict
- id: detect-private-key
- id: mixed-line-ending
args: [--fix, lf]
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: clippy
args: [--release, --all-targets]
# The hook above lints `default-members` (pegainfer-server) with default
# features, so the feature-gated kimi-k2 crate is never compiled and never
# linted. This local hook closes that hole — but only when kimi-k2 source
# changes (the CUDA build is expensive), and `--no-deps` keeps it scoped to
# the crate itself rather than its shared workspace dependencies.
- repo: local
hooks:
- id: clippy-kimi-k2
name: clippy (kimi-k2, -D warnings)
entry: cargo clippy -p pegainfer-kimi-k2 --no-deps --release --features kimi-k2,kernel-report --all-targets -- -D warnings
language: system
types: [rust]
files: ^pegainfer-kimi-k2/
pass_filenames: false
# The kimi-k2 hook above is --no-deps, so the kimi code living in
# pegainfer-kernels (ops/kimi_k2 + csrc) is never linted by it.
- id: clippy-kernels-kimi
name: clippy (kernels w/ kimi-k2, -D warnings)
entry: cargo clippy -p pegainfer-kernels --no-deps --release --features kimi-k2 --all-targets -- -D warnings
language: system
types: [rust]
files: ^pegainfer-kernels/
pass_filenames: false
- id: clippy-comm
name: clippy (pegainfer-comm, -D warnings)
entry: cargo clippy -p pegainfer-comm --no-deps --release --all-targets -- -D warnings
language: system
types: [rust]
files: ^pegainfer-comm/
pass_filenames: false