anvilsign in

collin/anvil · 28c75bf1

chore: pre-commit hook running nightly fmt + clippy

Collin Richards · 2026-06-10 08:12 UTC · 28c75bf14648a046bcbc053c88228174e5bbf390 · parent 76f9fe52 · browse files

added.githooks/pre-commit+13 −0
1+#!/bin/sh
2+# Pre-commit: rustfmt (nightly, for the unstable options in rustfmt.toml) + clippy.
3+# Wired up via `git config core.hooksPath .githooks`.
4+set -e
5+
6+if ! cargo +nightly fmt --all -- --check >/dev/null 2>&1; then
7+ cargo +nightly fmt --all
8+ echo "pre-commit: rustfmt reformatted files — review, re-stage, and commit again." >&2
9+ git diff --name-only -- '*.rs' >&2
10+ exit 1
11+fi
12+
13+cargo clippy --workspace --all-targets -- -D warnings
modifiedCLAUDE.md+4 −0
⋯ 1 unchanged line
22
33 A minimal, self-hosted git forge in Rust, built on gix (gitoxide).
44
5+Dev setup: `git config core.hooksPath .githooks` — the pre-commit hook runs
6+`cargo +nightly fmt` (nightly, for the unstable options in rustfmt.toml) and
7+`cargo clippy --workspace --all-targets -- -D warnings`.
8+
59 Current status, resume notes, the agreed next steps (a/b/c), and the roadmap live
610 in the TODO. Read it first:
711
⋯ 1 unchanged line