ci: check rustfmt in Travis

This commit is contained in:
Andrew Gallant 2020-02-17 17:53:12 -05:00
parent 3644208b03
commit c95f29e3ba

View File

@ -47,6 +47,12 @@ main() {
# Run tests for ripgrep and all sub-crates. # Run tests for ripgrep and all sub-crates.
"$CARGO" test --target "$TARGET" --verbose --all --features 'pcre2' "$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 main