travis: use stable rustfmt and switch to clippy-preview

This commit is contained in:
Victor Berger 2018-09-27 12:18:54 +02:00
parent 6328f68b71
commit cd77229199
2 changed files with 6 additions and 4 deletions

View File

@ -53,7 +53,7 @@ env:
matrix: matrix:
include: include:
# special features for lint & fmt # special features for lint & fmt
- rust: nightly - rust: stable
env: FEATURES="cargo-fmt" env: FEATURES="cargo-fmt"
- rust: nightly - rust: nightly
env: FEATURES="cargo-clippy" env: FEATURES="cargo-clippy"
@ -81,10 +81,9 @@ script:
vagga cargo-$TRAVIS_RUST_VERSION doc --no-deps vagga cargo-$TRAVIS_RUST_VERSION doc --no-deps
;; ;;
"cargo-fmt") "cargo-fmt")
vagga cargo-$TRAVIS_RUST_VERSION fmt -- --write-mode=diff vagga cargo-$TRAVIS_RUST_VERSION fmt -- --check
;; ;;
"cargo-clippy") "cargo-clippy")
vagga cargo-$TRAVIS_RUST_VERSION install -f clippy &&
vagga cargo-$TRAVIS_RUST_VERSION clippy --all-features -- -D warnings vagga cargo-$TRAVIS_RUST_VERSION clippy --all-features -- -D warnings
;; ;;
"anvil") "anvil")

View File

@ -19,6 +19,9 @@ containers:
- !Container base - !Container base
- !Env HOME: /work/.vagga/stable-home - !Env HOME: /work/.vagga/stable-home
- !Sh curl https://sh.rustup.rs -sSf | sh -s -- -y --default-host x86_64-unknown-linux-gnu --default-toolchain stable --no-modify-path - !Sh curl https://sh.rustup.rs -sSf | sh -s -- -y --default-host x86_64-unknown-linux-gnu --default-toolchain stable --no-modify-path
- !Env PATH: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/work/.vagga/stable-home/.cargo/bin:/work/.vagga/stable-home/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/
- !Sh rustup self update
- !Sh rustup component add rustfmt-preview
beta: beta:
auto-clean: true auto-clean: true
@ -45,7 +48,7 @@ containers:
- !Sh curl https://sh.rustup.rs -sSf | sh -s -- -y --default-host x86_64-unknown-linux-gnu --default-toolchain nightly --no-modify-path - !Sh curl https://sh.rustup.rs -sSf | sh -s -- -y --default-host x86_64-unknown-linux-gnu --default-toolchain nightly --no-modify-path
- !Env PATH: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/work/.vagga/nightly-home/.cargo/bin:/work/.vagga/nightly-home/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/ - !Env PATH: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/work/.vagga/nightly-home/.cargo/bin:/work/.vagga/nightly-home/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/
- !Sh rustup self update - !Sh rustup self update
- !Sh rustup component add rustfmt-preview - !Sh rustup component add clippy-preview
commands: commands:
update-stable: !Command update-stable: !Command