summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2020-02-17 17:53:12 -0500
committerAndrew Gallant <jamslam@gmail.com>2020-02-17 19:24:53 -0500
commitc95f29e3ba46ef622481995ab01fd9f4e931345c (patch)
tree626dd35fe9ee148bef9607b464720b80697b92f8
parent3644208b0302111320083122ad4f954d587f70be (diff)
ci: check rustfmt in Travis
-rwxr-xr-xci/script.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/ci/script.sh b/ci/script.sh
index 80bfabfc..523731d7 100755
--- a/ci/script.sh
+++ b/ci/script.sh
@@ -47,6 +47,12 @@ main() {
# Run tests for ripgrep and all sub-crates.
"$CARGO" test --target "$TARGET" --verbose --all --features 'pcre2'
+
+ # Check formatting.
+ if [ "$TRAVIS_RUST_VERSION" = "1.41.0" ]; then
+ rustup component add rustfmt
+ "$CARGO" fmt --all -- --check
+ fi
}
main