File tree 2 files changed +11
-3
lines changed 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
set -ex
2
+
3
+ echo " Running clippy base tests"
4
+
2
5
PATH=$PATH :./node_modules/.bin
3
6
remark -f * .md > /dev/null
7
+ # build clippy in debug mode and run tests
4
8
cargo build --features debugging
5
9
cargo test --features debugging
6
10
mkdir -p ~ /rust/cargo/bin
7
11
cp target/debug/cargo-clippy ~ /rust/cargo/bin/cargo-clippy
8
12
cp target/debug/clippy-driver ~ /rust/cargo/bin/clippy-driver
9
13
rm ~ /.cargo/bin/cargo-clippy
10
- PATH=$PATH :~ /rust/cargo/bin cargo clippy --all -- -D clippy
14
+ # run clippy on its own codebase...
15
+ PATH=$PATH :~ /rust/cargo/bin cargo clippy --all-targets --all-features -- -D clippy
16
+ # ... and some test directories
11
17
cd clippy_workspace_tests && PATH=$PATH :~ /rust/cargo/bin cargo clippy -- -D clippy && cd ..
12
18
cd clippy_workspace_tests/src && PATH=$PATH :~ /rust/cargo/bin cargo clippy -- -D clippy && cd ../..
13
19
cd clippy_workspace_tests/subcrate && PATH=$PATH :~ /rust/cargo/bin cargo clippy -- -D clippy && cd ../..
14
20
cd clippy_workspace_tests/subcrate/src && PATH=$PATH :~ /rust/cargo/bin cargo clippy -- -D clippy && cd ../../..
21
+ # test --manifest-path
15
22
PATH=$PATH :~ /rust/cargo/bin cargo clippy --manifest-path=clippy_workspace_tests/Cargo.toml -- -D clippy
16
23
cd clippy_workspace_tests/subcrate && PATH=$PATH :~ /rust/cargo/bin cargo clippy --manifest-path=../Cargo.toml -- -D clippy && cd ../..
17
24
set +x
Original file line number Diff line number Diff line change @@ -8,9 +8,10 @@ git clone --depth=1 https://github.com/${INTEGRATION}.git checkout
8
8
cd checkout
9
9
10
10
function check() {
11
- RUST_BACKTRACE=full cargo clippy --all & > clippy_output
11
+ # 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
12
13
cat clippy_output
13
- ! cat clippy_output | grep -q " internal compiler error"
14
+ ! cat clippy_output | grep -q " internal compiler error\|query stack during panic "
14
15
if [[ $? != 0 ]]; then
15
16
return 1
16
17
fi
You can’t perform that action at this time.
0 commit comments