From bcc309f27d8c619877bb9083031627b3fde29349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 27 Dec 2018 12:16:08 +0100 Subject: [PATCH] base tests: switch to nightly toolchain before checking formatting of tests with rustfmt this errored because rustfmt is not available on the master toolchain --- ci/base-tests.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/base-tests.sh b/ci/base-tests.sh index 537f7e124d4..d4da158a35f 100755 --- a/ci/base-tests.sh +++ b/ci/base-tests.sh @@ -42,9 +42,13 @@ set +x # some lints are sensitive to formatting, exclude some files needs_formatting=false +# switch to nightly +rustup default nightly for file in `find tests -not -path "tests/ui/methods.rs" -not -path "tests/ui/format.rs" -not -path "tests/ui/formatting.rs" -not -path "tests/ui/empty_line_after_outer_attribute.rs" -not -path "tests/ui/double_parens.rs" -not -path "tests/ui/doc.rs" -not -path "tests/ui/unused_unit.rs" | grep "\.rs$"` ; do rustfmt ${file} --check || echo "${file} needs reformatting!" ; needs_formatting=true done +# switch back to master +rustup default master if [ "${needs_reformatting}" = true ] ; then echo "Tests need reformatting!"