mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-07 13:25:45 +00:00
Don't require rustfmt on beta
This commit is contained in:
parent
64a9f568e9
commit
28bde0638e
@ -23,7 +23,6 @@ export CARGO_TARGET_DIR=`pwd`/target/
|
||||
|
||||
# Perform various checks for lint registration
|
||||
./util/dev update_lints --check
|
||||
cargo +nightly fmt --all -- --check
|
||||
|
||||
# Check running clippy-driver without cargo
|
||||
(
|
||||
@ -50,29 +49,5 @@ cargo +nightly fmt --all -- --check
|
||||
# TODO: CLIPPY_CONF_DIR / CARGO_MANIFEST_DIR
|
||||
)
|
||||
|
||||
# make sure tests are formatted
|
||||
|
||||
# some lints are sensitive to formatting, exclude some files
|
||||
tests_need_reformatting="false"
|
||||
# switch to nightly
|
||||
rustup override set nightly
|
||||
# avoid loop spam and allow cmds with exit status != 0
|
||||
set +ex
|
||||
|
||||
for file in `find tests | grep "\.rs$"` ; do
|
||||
rustfmt ${file} --check
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "${file} needs reformatting!"
|
||||
tests_need_reformatting="true"
|
||||
fi
|
||||
done
|
||||
|
||||
set -ex # reset
|
||||
|
||||
if [ "${tests_need_reformatting}" == "true" ] ; then
|
||||
echo "Tests need reformatting!"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# switch back to master
|
||||
# rustup override set master
|
||||
|
Loading…
Reference in New Issue
Block a user