Verify Rust source code formatting as part of the unit tests.

Only do this is rustfmt is installed, which likely means don't run on Travis
CI.
This commit is contained in:
Jakob Stoklund Olesen
2016-08-24 16:36:52 -07:00
parent 33235b3981
commit 46dec8a11d

View File

@@ -21,6 +21,12 @@ function banner() {
echo "====== $@ ======"
}
# Run rustfmt if we have it. (Travis probably won't).
if cargo install --list | grep -q '^rustfmt '; then
banner "Rust formatting"
$topdir/src/format-all.sh --write-mode=diff
fi
PKGS="cretonne cretonne-reader cretonne-tools"
cd "$topdir/src/tools"
for PKG in $PKGS