Run clippy before check to avoid being skipped (#10464)

* Run clippy before check to avoid being skipped

* Tweak output

* Apply a workaround
This commit is contained in:
Ryo Onodera 2020-06-09 12:25:39 +09:00 committed by GitHub
parent 704d98ac28
commit 9d07a23c46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -18,14 +18,15 @@ if _ scripts/cargo-for-all-lock-files.sh +"$rust_nightly" check --locked --all-t
else
check_status=$?
echo "Some Cargo.lock is outdated; please update them as well"
echo "protip: you can use ./scripts/cargo-for-all-lock-files.sh update ..."
echo "protip: you can use ./scripts/cargo-for-all-lock-files.sh [check|update] ..."
exit "$check_status"
fi
_ cargo +"$rust_stable" fmt --all -- --check
_ cargo +"$rust_nightly" clippy --version
_ cargo +"$rust_nightly" clippy --workspace --all-targets -- --deny=warnings
# -Z... is needed because of clippy bug: https://github.com/rust-lang/rust-clippy/issues/4612
_ cargo +"$rust_nightly" clippy -Zunstable-options --version
_ cargo +"$rust_nightly" clippy -Zunstable-options --workspace --all-targets -- --deny=warnings
_ cargo +"$rust_stable" audit --version
_ scripts/cargo-for-all-lock-files.sh +"$rust_stable" audit --ignore RUSTSEC-2020-0002 --ignore RUSTSEC-2020-0008

View File

@ -30,6 +30,9 @@ else
fi
for lock_file in $files; do
if [[ -n $CI ]]; then
echo "--- [$lock_file]: cargo " "${shifted_args[@]}" "$@"
fi
(
set -x
cd "$(dirname "$lock_file")"