fabaccess-bffh/tools/git-pre-push-hook
2022-05-05 19:21:51 +02:00

13 lines
230 B
Bash
Executable File

#!/usr/bin/env bash
echo -e "Checking code formatting:\n=========================\n\n" 1>&2
cargo fmt --check
if [[ $? -ne 0 ]]
then
o=$?
echo -e "\n\nRun \`cargo fmt --all\` before pushing please." 1>&2
exit $o
fi