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:
@@ -21,6 +21,12 @@ function banner() {
|
|||||||
echo "====== $@ ======"
|
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"
|
PKGS="cretonne cretonne-reader cretonne-tools"
|
||||||
cd "$topdir/src/tools"
|
cd "$topdir/src/tools"
|
||||||
for PKG in $PKGS
|
for PKG in $PKGS
|
||||||
|
|||||||
Reference in New Issue
Block a user