diff --git a/contrib/pre-commit b/contrib/pre-commit new file mode 100644 index 0000000..4b7e99b --- /dev/null +++ b/contrib/pre-commit @@ -0,0 +1,12 @@ +#!/bin/bash + +FMTCMD="${CARGO_FMT_CMD:cargo fmt -- --check}" + +# Redirect output to stderr. +exec 1>&2 + +unset RUST_LOG +set -e + +# check everything else +$FMTCMD