Closed jannschu closed 4 years ago
Note: this breaks rustfmt (I can fix it).
To avoid that, I suggest to add something to your .git/hooks/pre-push
file.I use:
#!/bin/sh
remote="$1"
url="$2"
if [ -f Cargo.toml ] && cargo sync-readme -V >/dev/null 2>&1; then
echo "[+] check sync-readme"
if ! cargo sync-readme -c; then
exit 1
fi
fi
if [ -f Cargo.toml ] && cargo fmt --version >/dev/null 2>&1; then
echo "[+] check rustfmt"
if ! cargo fmt --all -- --check; then
exit 2
fi
fi
exit 0
Merged, with some modifications (rustfmt
), in f0bd012 and 3d309c5
Thanks!
See rusticata/asn1-rs#20.