-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
52 lines (51 loc) · 2.14 KB
/
.pre-commit-config.yaml
File metadata and controls
52 lines (51 loc) · 2.14 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
# Stop after the first failing hook so a broken Block 1 never runs Block 2 (code review + contract tests).
fail_fast: true
repos:
- repo: local
hooks:
- id: verify-module-signatures
name: Verify module signatures and version bumps
entry: ./scripts/pre-commit-verify-modules-signature.sh
language: system
pass_filenames: false
always_run: true
# One hook = one pre-commit buffer flush. Split Block 1 so format/YAML/bundle/lint output
# appears after each stage instead of only when the whole block finishes.
- id: modules-block1-format
name: "Block 1 — stage 1/4 — format"
entry: ./scripts/pre-commit-quality-checks.sh block1-format
language: system
pass_filenames: false
always_run: true
verbose: true
# pass_filenames: false — same chunking issue as lint; script runs repo-wide yaml-lint once.
- id: modules-block1-yaml
name: "Block 1 — stage 2/4 — yaml-lint (when YAML staged)"
entry: ./scripts/pre-commit-quality-checks.sh block1-yaml
language: system
pass_filenames: false
files: \.(yaml|yml)$
verbose: true
- id: modules-block1-bundle
name: "Block 1 — stage 3/4 — bundle import boundaries"
entry: ./scripts/pre-commit-quality-checks.sh block1-bundle
language: system
pass_filenames: false
always_run: true
verbose: true
# pass_filenames: false — otherwise pre-commit re-invokes this hook per filename chunk (ARG_MAX),
# and each run still executes full-repo `hatch run lint` (wasteful duplicate output).
- id: modules-block1-lint
name: "Block 1 — stage 4/4 — lint (when Python staged)"
entry: ./scripts/pre-commit-quality-checks.sh block1-lint
language: system
pass_filenames: false
files: \.(py|pyi)$
verbose: true
- id: modules-block2
name: "Block 2 — code review + contract tests"
entry: ./scripts/pre-commit-quality-checks.sh block2
language: system
pass_filenames: false
always_run: true
verbose: true