Skip to content

Commit 9533366

Browse files
authored
Merge pull request #73 from Atul9/add-cargo-fmt-to-travis
Add cargo fmt to travis build config
2 parents 843b96e + 2ff2296 commit 9533366

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,12 @@ rust:
55
- nightly
66

77
script:
8+
- |
9+
if [[ $TRAVIS_RUST_VERSION == *stable* ]]
10+
then
11+
rustup component add rustfmt
12+
cargo fmt --version
13+
cargo fmt -- --check || (echo "Please reformat your code with 'cargo fmt' (version $(cargo fmt --version))"; false)
14+
fi
815
- cargo build --verbose --all
916
- cargo test --verbose --all

0 commit comments

Comments
 (0)