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
#!/usr/bin/env bash
# Pre-commit gate — mirrors the CI fmt + clippy + audit steps
# (.github/workflows/ci.yml) so a commit can't introduce drift CI would reject.
#
# Enable once per clone (these hooks are version-controlled under .githooks/,
# not auto-installed):
#
# git config core.hooksPath .githooks
#
# Bypass in an emergency with `git commit --no-verify` (CI still enforces it).
# Dependency vulnerability gate — mirrors the CI `audit` job and honors the
# accepted-advisory list in `.cargo/audit.toml`. Hard gate when `cargo-audit`
# is installed; otherwise prints an install hint and continues (CI still
# enforces it) so the hook stays usable for contributors without the tool.
if ; then
else
fi
# Best-effort knowledge-graph refresh — no-op when the tool isn't installed,
# so this hook stays portable for contributors who don't use code-review-graph.
if ; then
||
fi