From 6d10611ae9d6ac542704772e377bc4c2e27e3701 Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Fri, 17 May 2024 22:37:14 -0300 Subject: [PATCH] Add cargo machete to CI (#155) * Add cargo machete to CI * Correct machete findings --- .github/workflows/code.yml | 6 ++++++ Cargo.lock | 1 - crates/xwt-cert-gen/Cargo.toml | 2 +- examples/microapp/server-shared/Cargo.toml | 1 - 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index 158f5488..51463496 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -105,6 +105,12 @@ jobs: sudo tar -xzvf - -C /usr/local/bin run: cargo-sort -cwg + - name: cargo-machete + download: > + curl -sSL "https://github.com/bnjbvr/cargo-machete/releases/download/v0.6.0/cargo-machete-v0.6.0-x86_64-unknown-linux-musl.tar.gz" | + sudo tar -xzvf - --strip-components=1 -C /usr/local/bin + run: cargo-machete + - name: typos download: > curl -sSL "https://github.com/crate-ci/typos/releases/download/v1.21.0/typos-v1.21.0-x86_64-unknown-linux-musl.tar.gz" | diff --git a/Cargo.lock b/Cargo.lock index aca539d9..5c9024ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1973,7 +1973,6 @@ name = "xwt-example-server-shared" version = "0.1.0" dependencies = [ "futures-util", - "rand", "tokio", "xwt-core", ] diff --git a/crates/xwt-cert-gen/Cargo.toml b/crates/xwt-cert-gen/Cargo.toml index f66c6b6a..1440039e 100644 --- a/crates/xwt-cert-gen/Cargo.toml +++ b/crates/xwt-cert-gen/Cargo.toml @@ -11,7 +11,7 @@ Useful for generating certificate. Also usable without xwt. repository = "https://github.com/MOZGIII/xwt" [package.metadata.cargo-machete] -ignored = ["sha2"] +ignored = ["sha2", "getrandom"] [dependencies] der = { version = "0.7", default-features = false, features = ["alloc"] } diff --git a/examples/microapp/server-shared/Cargo.toml b/examples/microapp/server-shared/Cargo.toml index 44d59c1b..99e08789 100644 --- a/examples/microapp/server-shared/Cargo.toml +++ b/examples/microapp/server-shared/Cargo.toml @@ -8,5 +8,4 @@ publish = false xwt-core = { version = "0.4", path = "../../../crates/xwt-core" } futures-util = "0.3" -rand = "0.8" tokio = { version = "1", default-features = false, features = ["time"] }