File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 11set -ex
2+
3+ echo " Running clippy base tests"
4+
25PATH=$PATH :./node_modules/.bin
36remark -f * .md > /dev/null
7+ # build clippy in debug mode and run tests
48cargo build --features debugging
59cargo test --features debugging
610mkdir -p ~ /rust/cargo/bin
711cp target/debug/cargo-clippy ~ /rust/cargo/bin/cargo-clippy
812cp target/debug/clippy-driver ~ /rust/cargo/bin/clippy-driver
913rm ~ /.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
1117cd clippy_workspace_tests && PATH=$PATH :~ /rust/cargo/bin cargo clippy -- -D clippy && cd ..
1218cd clippy_workspace_tests/src && PATH=$PATH :~ /rust/cargo/bin cargo clippy -- -D clippy && cd ../..
1319cd clippy_workspace_tests/subcrate && PATH=$PATH :~ /rust/cargo/bin cargo clippy -- -D clippy && cd ../..
1420cd clippy_workspace_tests/subcrate/src && PATH=$PATH :~ /rust/cargo/bin cargo clippy -- -D clippy && cd ../../..
21+ # test --manifest-path
1522PATH=$PATH :~ /rust/cargo/bin cargo clippy --manifest-path=clippy_workspace_tests/Cargo.toml -- -D clippy
1623cd clippy_workspace_tests/subcrate && PATH=$PATH :~ /rust/cargo/bin cargo clippy --manifest-path=../Cargo.toml -- -D clippy && cd ../..
1724set +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
88cd checkout
99
1010function 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
1213 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 "
1415 if [[ $? != 0 ]]; then
1516 return 1
1617 fi
You can’t perform that action at this time.
0 commit comments