Skip to content

Commit

Permalink
chore: Add cargo-machete to detect unused dependencies (#817)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto committed Feb 10, 2023
1 parent 6ddef5e commit 597a54b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/continuous-integration-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ jobs:
# args: --workspace --all-targets
# toolchain: stable

machete:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-machete
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-machete
- name: Check unused dependencies
run: cargo machete

test:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
1 change: 0 additions & 1 deletion conformance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ edition = "2018"
[dependencies]
bytes = "1"
env_logger = { version = "0.8", default-features = false }
log = "0.4"
prost = { path = ".." }
protobuf = { path = "../protobuf" }
tests = { path = "../tests" }
1 change: 0 additions & 1 deletion prost-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ default = ["std"]
std = ["prost/std"]

[dependencies]
bytes = { version = "1", default-features = false }
prost = { version = "0.11.6", path = "..", default-features = false, features = ["prost-derive"] }

[dev-dependencies]
Expand Down
4 changes: 3 additions & 1 deletion protobuf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ publish = false
edition = "2018"

[dependencies]
bytes = { version = "1", default-features = false }
prost = { path = ".." }
prost-types = { path = "../prost-types" }

Expand Down Expand Up @@ -39,3 +38,6 @@ bench = false
[[bench]]
name = "dataset"
harness = false

[package.metadata.cargo-machete]
ignored = ["prost-types"]

0 comments on commit 597a54b

Please sign in to comment.