From c95f29e3ba46ef622481995ab01fd9f4e931345c Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Mon, 17 Feb 2020 17:53:12 -0500 Subject: [PATCH] ci: check rustfmt in Travis --- ci/script.sh | 6 ++++++ 1 file changed, 6 insertions(+) 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