summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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