diff options
author | Andrew Gallant <jamslam@gmail.com> | 2020-02-17 17:53:12 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2020-02-17 19:24:53 -0500 |
commit | c95f29e3ba46ef622481995ab01fd9f4e931345c (patch) | |
tree | 626dd35fe9ee148bef9607b464720b80697b92f8 | |
parent | 3644208b0302111320083122ad4f954d587f70be (diff) |
ci: check rustfmt in Travis
-rwxr-xr-x | ci/script.sh | 6 |
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 |