Files
ipx/.githooks/pre-commit
rays c90a66a24f Clippy clean, and rustfmt and clippy part of the checks
cargo clippy --workspace --all-targets had 24 warnings; its own fixes took
most, the rest by hand: two type aliases for long types, a struct built
whole, a checked division, a doc comment's stray blank line. Its fix for
the stale-feed fold was wrong: `any` stops at the first feed it removes,
where the fold removed every one, so that is a loop instead.

A pre-commit hook in .githooks refuses unformatted Rust; clippy, being a
build, is in CLAUDE.md's checks with -D warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 21:59:37 +00:00

8 lines
389 B
Bash
Executable File

#!/bin/sh
# Refuses a commit whose Rust is not as rustfmt writes it. Clippy is left to the checks before a
# push (CLAUDE.md, Tests): it is a build, and Tower's builds go one at a time.
git diff --cached --name-only --diff-filter=ACM | grep -q '\.rs$' || exit 0
cargo fmt --all --check >/dev/null 2>&1 && exit 0
echo "pre-commit: the Rust is not formatted; run cargo fmt --all" >&2
exit 1