-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathprek.toml
More file actions
67 lines (61 loc) · 1.4 KB
/
prek.toml
File metadata and controls
67 lines (61 loc) · 1.4 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
# The prek configuration defining linting requirements. This
# setup is optimised for long-term stability and determinism,
# and therefore only uses either "builtin" rules or "local"
# rules implementing lint workflows. We do not use any remote
# workflow repos.
files = { glob = [
"msprime/**",
"benchmarks/**",
"tests/**",
"*.toml",
"docs/**",
"lib/*.[c,h]",
"lib/tests/*.[c,h]",
]}
exclude = { glob = ["lib/avl.*", "lib/subprojects/**"]}
[[repos]]
repo = "builtin"
hooks = [
# { id = "trailing-whitespace" },
# { id = "end-of-file-fixer" },
{ id = "check-added-large-files" },
{ id = "check-merge-conflict" },
{ id = "mixed-line-ending" },
{ id = "check-case-conflict" },
{ id = "check-yaml" },
{ id = "check-toml" },
]
[[repos]]
repo = "local"
hooks = [
{
id = "ruff-check",
name = "ruff check",
language = "system",
entry = "uv run --only-group=lint ruff check --fix --force-exclude",
types = ["python"],
},
]
[[repos]]
repo = "local"
hooks = [
{
id = "ruff-format",
name = "ruff format",
language = "system",
entry = "uv run --only-group=lint ruff format --force-exclude",
types = ["python"],
},
]
[[repos]]
repo = "local"
hooks = [
{
id = "clang-format",
name = "clang-format",
language = "system",
entry = "uv run --only-group=lint clang-format -i",
types = ["c"],
verbose = true,
},
]