Test all crates and format on pre-commit

This commit is contained in:
Adam Wright
2016-02-15 13:44:28 -08:00
committed by Adam Wright
parent 8957d2dac3
commit e2756edd72
2 changed files with 24 additions and 11 deletions

View File

@@ -52,3 +52,11 @@ fi
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
function cargo_format() {
echo ${YELLOW}[PRECOMMIT]${NC} Formatting $1 ...
cargo fmt --manifest-path $1/Cargo.toml &>/dev/null
}