From a09f6dfff5dc4a2e6eea775d11ef825b17aa2e6d Mon Sep 17 00:00:00 2001 From: Atul Bhosale Date: Sun, 21 Jun 2020 18:00:48 +0530 Subject: [PATCH] Add cargo fmt to travis build config --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6e6b124b..53431f67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,12 @@ rust: - 1.36.0 script: + - | + if [[ $TRAVIS_RUST_VERSION == "stable" ]] + then + rustup component add rustfmt + cargo fmt --all -- --check || (echo "Please reformat your code with 'cargo fmt'"; false) + fi - cargo build --verbose - cargo test --verbose - cargo doc --verbose