Skip to content

Commit 7fc71a3

Browse files
authored
Merge pull request #24 from Atul9/cargo-fmt
Add cargo fmt to travis build config
2 parents 5280226 + 35d312f commit 7fc71a3

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
@@ -3,6 +3,13 @@ rust:
33
- stable
44
- nightly
55
script:
6+
- |
7+
if [[ $TRAVIS_RUST_VERSION == *stable* ]]
8+
then
9+
rustup component add rustfmt
10+
cargo fmt --version
11+
cargo fmt -- --check || (echo "Please reformat your code with 'cargo fmt' (version $(cargo fmt --version))"; false)
12+
fi
613
- cargo test
714
- |
815
[ $TRAVIS_RUST_VERSION != nightly ] ||

0 commit comments

Comments
 (0)