From 9194a40acdcd513a42a091f7226b1fd34a385e07 Mon Sep 17 00:00:00 2001 From: lzutao Date: Thu, 9 May 2019 02:20:38 +0700 Subject: [PATCH] CI: Check Rust formatting for each commit (#909) --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 542f18ca..5cdfeb89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,6 +44,11 @@ before_install: script: - cargo test --all - cargo test --all --no-default-features + - if [ "$TARGET" = x86_64-unknown-linux-gnu ] && [ "$TRAVIS_RUST_VERSION" = stable ]; then + rustup component add rustfmt; + rustfmt -vV; + cargo fmt --all -- --check; + fi before_deploy: - sh ci/before_deploy.sh