-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
55 lines (50 loc) · 2.14 KB
/
.pre-commit-config.yaml
File metadata and controls
55 lines (50 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
53
54
55
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-merge-conflict
# ESLint and cargo clippy are intentionally omitted here — they run too
# slowly to gate every commit in the shared multi-agent tree. CI and
# cargo-guard.sh already enforce them.
- repo: local
hooks:
- id: block-claude-attribution
name: Block Claude Attribution
entry: bash .pre-commit-hooks/block-claude-attribution.sh
language: system
stages: [commit-msg]
# Drift guard for the Tauri event payload TypeScript bindings.
# Triggers when any of the source-of-truth Rust files change. The hook
# regenerates `qontinui-schemas/ts/src/generated/` + the `tauri-events`
# bundle and aborts the commit if the regenerated output differs from
# what's checked in. Run `npm run gen-events` from `qontinui-runner/`
# to refresh.
- id: gen-events-drift
name: Tauri Event Bindings Drift Guard
entry: bash .pre-commit-hooks/gen-events-drift.sh
language: system
files: '^(src-tauri/src/(event_system/types|tauri_event_payloads|findings/types|schema_export)\.rs|../qontinui-schemas/rust/src/(terminal|task_run|app_events)\.rs)$'
pass_filenames: false
# Pre-push only: cargo fmt --check + clippy -D warnings, mirroring
# CI's Rust gate. Runs once per `git push` (not per commit), and
# only when src-tauri/ changed in the pushed range. Lets you catch
# the same lint/fmt failures CI would 8-15 min later in 60-90s
# locally. Bypass with `git push --no-verify` or
# QONTINUI_PREPUSH_SKIP=1.
#
# Install once with: pre-commit install --hook-type pre-push
- id: cargo-prepush
name: cargo fmt + clippy (pre-push)
entry: bash .pre-commit-hooks/cargo-prepush.sh
language: system
stages: [pre-push]
pass_filenames: false
always_run: true
ci:
autofix_prs: true
autofix_commit_msg: 'chore: pre-commit auto fixes'