chore: Add cargo-machete to detect unused dependencies (#1259)

This commit is contained in:
tottoto
2023-02-08 09:08:21 -05:00
committed by GitHub
parent 2e3e9acf7b
commit b3567a394f
16 changed files with 51 additions and 0 deletions
+6
View File
@@ -27,6 +27,10 @@ jobs:
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-hack
- name: Install cargo-machete
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-machete
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
@@ -34,6 +38,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Check fmt
run: cargo fmt -- --check
- name: Check unused dependencies
run: cargo machete
- name: Check features
run: cargo hack check --all --ignore-private --each-feature --no-dev-deps
- name: Check all targets
+3
View File
@@ -293,3 +293,6 @@ tower-http = { version = "0.3", optional = true }
[build-dependencies]
tonic-build = { path = "../tonic-build", features = ["prost"] }
[package.metadata.cargo-machete]
ignored = ["prost-types"]
+3
View File
@@ -35,3 +35,6 @@ tracing-subscriber = {version = "0.3", features = ["env-filter"]}
[build-dependencies]
tonic-build = {path = "../tonic-build", features = ["prost"]}
[package.metadata.cargo-machete]
ignored = ["prost"]
+3
View File
@@ -14,3 +14,6 @@ tonic = {path = "../../tonic"}
[build-dependencies]
tonic-build = {path = "../../tonic-build"}
[package.metadata.cargo-machete]
ignored = ["prost"]
+3
View File
@@ -21,3 +21,6 @@ tower-http = {version = "0.3", features = ["map-response-body", "map-request-bod
[build-dependencies]
tonic-build = {path = "../../tonic-build" }
[package.metadata.cargo-machete]
ignored = ["prost"]
+3
View File
@@ -15,3 +15,6 @@ tonic = { path = "../../tonic" }
[build-dependencies]
prost-build = "0.11.6"
tonic-build = { path = "../../tonic-build" }
[package.metadata.cargo-machete]
ignored = ["prost"]
@@ -15,3 +15,6 @@ uuid = {package = "uuid1", path = "../uuid"}
[build-dependencies]
tonic-build = {path = "../../../tonic-build"}
[package.metadata.cargo-machete]
ignored = ["prost"]
+3
View File
@@ -12,3 +12,6 @@ version = "0.1.0"
prost = "0.11"
[build-dependencies]
prost-build = "0.11.6"
[package.metadata.cargo-machete]
ignored = ["prost"]
+3
View File
@@ -14,3 +14,6 @@ tonic = {path = "../../tonic"}
[build-dependencies]
tonic-build = {path = "../../tonic-build"}
[package.metadata.cargo-machete]
ignored = ["prost"]
+3
View File
@@ -29,3 +29,6 @@ tracing-subscriber = {version = "0.3", features = ["env-filter"]}
[build-dependencies]
tonic-build = {path = "../../tonic-build"}
[package.metadata.cargo-machete]
ignored = ["prost"]
+3
View File
@@ -14,3 +14,6 @@ tonic = {path = "../../tonic"}
[build-dependencies]
tonic-build = {path = "../../tonic-build"}
[package.metadata.cargo-machete]
ignored = ["prost"]
+3
View File
@@ -12,3 +12,6 @@ tonic = {path = "../../tonic"}
[build-dependencies]
tonic-build = {path = "../../tonic-build"}
[package.metadata.cargo-machete]
ignored = ["prost"]
+3
View File
@@ -14,3 +14,6 @@ tonic = {path = "../../tonic"}
[build-dependencies]
tonic-build = {path = "../../tonic-build"}
[package.metadata.cargo-machete]
ignored = ["prost"]
+3
View File
@@ -14,3 +14,6 @@ tonic = { path = "../../tonic" }
[build-dependencies]
tonic-build = { path = "../../tonic-build" }
[package.metadata.cargo-machete]
ignored = ["prost"]
+3
View File
@@ -18,3 +18,6 @@ tonic = {path = "../../tonic"}
[build-dependencies]
prost-build = "0.11.6"
tonic-build = {path = "../../tonic-build"}
[package.metadata.cargo-machete]
ignored = ["prost"]
+3
View File
@@ -15,3 +15,6 @@ tonic = {path = "../../tonic"}
[build-dependencies]
tonic-build = {path = "../../tonic-build"}
[package.metadata.cargo-machete]
ignored = ["prost", "prost-types"]