-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
85 lines (75 loc) · 2.31 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
85 lines (75 loc) · 2.31 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
default_language_version:
python: python3.14
exclude: |
(?x)^(
vendor/.*|
out/.*|
zig-out/.*|
\.zig-cache/.*|
data/reference_data/.*|
validation/(\.cache|function_diff|latest|runs|scratch|tmp|work)/.*
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-added-large-files
args: ["--maxkb=1024"]
- id: check-toml
- id: check-yaml
- id: check-json
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.12
hooks:
- id: ruff-format
- id: ruff-check
args: [--fix]
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.10
hooks:
- id: uv-lock
- repo: local
hooks:
- id: forbid-future-annotations
name: forbid future annotations import
entry: from __future__ import annotations
language: pygrep
files: '\.(py|ipynb)$'
- id: basedpyright
name: basedpyright
entry: uv run --group dev basedpyright
language: system
types: [python]
pass_filenames: false
- id: ty
name: ty (preview, advisory)
# Preview tool — output is shown but never blocks the commit.
# Drop the `; true` once ty is stable enough to gate on.
entry: sh -c 'uv run --group dev ty check; true'
language: system
types: [python]
pass_filenames: false
verbose: true
- id: zig-styleguide-src
name: zig styleguide (src, advisory)
# Advisory until the existing src/ styleguide backlog is drained.
entry: sh -c 'uv run scripts/linting/check-zig-styleguide.py --format text "$@" || true' --
language: system
files: '^src/.*\.zig$'
verbose: true
- id: zig-dod-layout-src
name: zig DOD layout audit (src, advisory)
# Advisory ranking pass; use --fail-on once findings are triaged.
entry: sh -c 'uv run scripts/linting/check-zig-dod-layout.py src || true'
language: system
files: '^src/.*\.zig$'
pass_filenames: false
verbose: true
- id: zig-fmt
name: zig fmt
entry: zig fmt --check
language: system
files: '\.(zig|zon)$'