diff --git a/tests/integration_tests/build/test_dependencies.py b/tests/integration_tests/build/test_dependencies.py index 778f5facc22..7094cc2da6b 100644 --- a/tests/integration_tests/build/test_dependencies.py +++ b/tests/integration_tests/build/test_dependencies.py @@ -25,3 +25,12 @@ def test_licenses(): ) cargo("deny", f"--manifest-path {toml_file} check licenses bans") + + +def test_unused_dependencies(): + """ + Test that there are no unused dependencies. + """ + cargo("install cargo-udeps") + + cargo("+nightly udeps --all") diff --git a/tools/devctr/Dockerfile b/tools/devctr/Dockerfile index 5ba0ca57831..be68ecfb98f 100644 --- a/tools/devctr/Dockerfile +++ b/tools/devctr/Dockerfile @@ -109,8 +109,9 @@ RUN cd /tmp/poetry && \ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN" \ && rustup target add x86_64-unknown-linux-musl \ && rustup target add aarch64-unknown-linux-musl \ + && rustup install nightly \ && rustup component add llvm-tools-preview \ - && cargo install cargo-audit cargo-deny grcov cargo-sort \ + && cargo install cargo-audit cargo-deny grcov cargo-sort cargo-udeps \ && (if [ "$ARCH" = "x86_64" ]; then cargo install kani-verifier && cargo kani setup; else true; fi) \ \ && apt-get update \