File tree Expand file tree Collapse file tree 1 file changed +19
-17
lines changed Expand file tree Collapse file tree 1 file changed +19
-17
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
1
2
set -x
2
- rm ~ /.cargo/bin/cargo-clippy
3
- cargo install --force --path .
3
+
4
+ if [[ -z " $INTEGRATION " ]]; then
5
+ exit 0
6
+ fi
7
+
8
+ cargo install -Z install-upgrade --debug --path .
4
9
5
10
echo " Running integration test for crate ${INTEGRATION} "
6
11
7
- git clone --depth=1 https://github.com/${INTEGRATION} .git checkout
8
- cd checkout
12
+ git clone --depth=1 " https://github.com/${INTEGRATION} .git" checkout
13
+ cd checkout || exit 1
9
14
10
- function check() {
11
15
# run clippy on a project, try to be verbose and trigger as many warnings as possible for greater coverage
12
- RUST_BACKTRACE=full cargo clippy --all-targets --all-features -- --cap-lints warn -W clippy::pedantic -W clippy::nursery & > clippy_output
13
- cat clippy_output
14
- ! cat clippy_output | grep -q " internal compiler error\|query stack during panic\|E0463 "
15
- if [[ $? != 0 ]] ; then
16
- return 1
17
- fi
18
- }
16
+ RUST_BACKTRACE=full \
17
+ cargo clippy \
18
+ --all-targets \
19
+ --all-features \
20
+ -- --cap-lints warn -W clippy::pedantic -W clippy::nursery \
21
+ 2>& 1 \
22
+ | tee clippy_output
19
23
20
- case ${INTEGRATION} in
21
- * )
22
- check
23
- ;;
24
- esac
24
+ if grep -q " internal compiler error\|query stack during panic\|E0463" clippy_output; then
25
+ exit 1
26
+ fi
You can’t perform that action at this time.
0 commit comments