-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathprek.toml
More file actions
109 lines (100 loc) · 2.66 KB
/
Copy pathprek.toml
File metadata and controls
109 lines (100 loc) · 2.66 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
fail_fast = true
# Built-in hooks (native Rust, fast)
[[repos]]
repo = "builtin"
hooks = [
{ id = "trailing-whitespace" },
{ id = "end-of-file-fixer" },
{ id = "check-toml" },
{ id = "check-yaml" },
{ id = "check-merge-conflict" },
{ id = "check-added-large-files", args = ["--maxkb=512"] },
{ id = "detect-private-key" },
{ id = "no-commit-to-branch", args = ["-b", "main"] },
]
# Rust: format check
[[repos]]
repo = "local"
[[repos.hooks]]
id = "cargo-fmt"
name = "cargo fmt"
language = "system"
entry = "cargo fmt --all -- --check"
pass_filenames = false
types = ["rust"]
# Rust: check (catches errors clippy might miss with different feature flags)
[[repos]]
repo = "local"
[[repos.hooks]]
id = "cargo-check"
name = "cargo check"
language = "system"
entry = "cargo check --workspace --all-targets"
pass_filenames = false
types = ["rust"]
# Rust: clippy lint
[[repos]]
repo = "local"
[[repos.hooks]]
id = "cargo-clippy"
name = "cargo clippy"
language = "system"
entry = "cargo clippy --workspace -- -D warnings"
pass_filenames = false
types = ["rust"]
# Rust: unused-dependency check across the whole workspace.
# cargo-machete is installed via mise (see mise.toml); `mise exec --` is used so
# the hook works even outside a mise-activated shell. This is the sole machete
# check: it runs locally on commit and in CI via the `pre-commit` job (which
# runs the full hook suite) — there is no separate cargo-machete CI job.
[[repos]]
repo = "local"
[[repos.hooks]]
id = "cargo-machete"
name = "cargo machete (unused deps)"
language = "system"
entry = "mise exec -- cargo-machete"
pass_filenames = false
types = ["rust"]
# Python: ruff format check
[[repos]]
repo = "local"
[[repos.hooks]]
id = "ruff-format"
name = "ruff format"
language = "system"
entry = "uvx ruff format --check ppvm-python/src ppvm-python/test"
pass_filenames = false
types = ["python"]
# Python: ruff lint
[[repos]]
repo = "local"
[[repos.hooks]]
id = "ruff-check"
name = "ruff check"
language = "system"
entry = "uvx ruff check ppvm-python/"
pass_filenames = false
types = ["python"]
# License headers: hawkeye (Rust-based SPDX header checker)
# Installed via mise (see mise.toml); `mise exec --` is used so the hook
# works even outside a mise-activated shell. Run `mise exec -- hawkeye
# format` manually to apply headers to new files.
[[repos]]
repo = "local"
[[repos.hooks]]
id = "hawkeye"
name = "hawkeye license header check"
language = "system"
entry = "mise exec -- hawkeye check"
pass_filenames = false
# Python: ty type check
[[repos]]
repo = "local"
[[repos.hooks]]
id = "ty-check"
name = "ty check"
language = "system"
entry = "uvx ty check --project ppvm-python"
pass_filenames = false
types = ["python"]