anvilsign in

collin/anvil

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`.
4set -e
5
6if ! 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
11fi
12
13cargo clippy --workspace --all-targets -- -D warnings