-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
58 lines (53 loc) · 2.36 KB
/
.pre-commit-config.yaml
File metadata and controls
58 lines (53 loc) · 2.36 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
repos:
# ── Generic file hygiene ──────────────────────────────────────────────
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: ['--allow-multiple-documents']
- id: check-toml
- id: check-added-large-files
args: ['--maxkb=500']
- id: check-merge-conflict
- id: detect-private-key
# ── Rust checks ───────────────────────────────────────────────────────
- repo: local
hooks:
# ── Formatting ─────────────────────────────────────────────────
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --all -- --check
language: system
types: [rust]
pass_filenames: false
# ── Linting ────────────────────────────────────────────────────
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy --workspace --all-targets -- -D warnings
language: system
types: [rust]
pass_filenames: false
# ── Tests (pre-push only — too slow for every commit) ──────────
- id: cargo-test
name: cargo test
entry: cargo test --workspace
language: system
types: [rust]
pass_filenames: false
stages: [pre-push]
# ── Rivet artifact validation ──────────────────────────────────
- id: rivet-validate
name: rivet validate
entry: rivet validate
language: system
files: '(rivet\.yaml|artifacts/.*\.yaml|safety/.*\.yaml)'
pass_filenames: false
# ── Rivet commit-message traceability check ────────────────────
- id: rivet-commit-msg
name: rivet commit-msg check
entry: rivet commit-msg-check
language: system
stages: [commit-msg]
always_run: true