Skip to content

Commit 02f8cb2

Browse files
committed
add ./miri clippy
1 parent 328a8c7 commit 02f8cb2

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,8 @@ jobs:
9898
./rustup-toolchain "" -c clippy
9999
- name: rustfmt
100100
run: ./miri fmt --check
101-
- name: clippy (miri)
102-
run: cargo clippy --all-targets -- -D warnings
103-
#- name: Clippy (ui_test)
104-
# run: cargo clippy --manifest-path ui_test/Cargo.toml --all-targets -- -D warnings
105-
- name: clippy (cargo-miri)
106-
run: cargo clippy --manifest-path cargo-miri/Cargo.toml --all-targets -- -D warnings
101+
- name: clippy
102+
run: ./miri clippy -- -D warnings
107103
- name: rustdoc
108104
run: RUSTDOCFLAGS="-Dwarnings" cargo doc --document-private-items
109105

miri

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ times and slower execution times.
2828
./miri fmt <flags>:
2929
Format all sources and tests. <flags> are passed to `rustfmt`.
3030
31+
./miri clippy <flags>:
32+
Format all sources and tests. <flags> are passed to `cargo clippy`.
33+
3134
ENVIRONMENT VARIABLES
3235
3336
MIRI_SYSROOT:
@@ -163,6 +166,11 @@ fmt)
163166
find "$MIRIDIR" -not \( -name target -prune \) -name '*.rs' \
164167
| xargs rustfmt --edition=2021 --config-path "$MIRIDIR/rustfmt.toml" "$@"
165168
;;
169+
clippy)
170+
cargo clippy $CARGO_BUILD_FLAGS --manifest-path "$MIRIDIR"/Cargo.toml --all-targets "$@"
171+
#cargo clippy $CARGO_BUILD_FLAGS --manifest-path "$MIRIDIR"/ui_test/Cargo.toml --all-targets "$@"
172+
cargo clippy $CARGO_BUILD_FLAGS --manifest-path "$MIRIDIR"/cargo-miri/Cargo.toml "$@"
173+
;;
166174
*)
167175
if [ -n "$COMMAND" ]; then
168176
echo "Unknown command: $COMMAND"

rustup-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fi
4242

4343
# Install and setup new toolchain.
4444
rustup toolchain uninstall miri
45-
rustup-toolchain-install-master -n miri -c cargo -c rust-src -c rustc-dev -c llvm-tools -c rustfmt "$@" -- "$NEW_COMMIT"
45+
rustup-toolchain-install-master -n miri -c cargo -c rust-src -c rustc-dev -c llvm-tools -c rustfmt -c clippy "$@" -- "$NEW_COMMIT"
4646
rustup override set miri
4747

4848
# Cleanup.

0 commit comments

Comments
 (0)