Skip to content

Commit b42d512

Browse files
chore: Add unused deps lint (#10666)
* add missing dependency linters * add dependency linter to binaries * remove comment * remove linter from main.rs * remove unused deps, silence linter warnings * move imports to dev dependencies
1 parent 7b18dc8 commit b42d512

File tree

11 files changed

+18
-22
lines changed

11 files changed

+18
-22
lines changed

Cargo.lock

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/anvil/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ thiserror.workspace = true
9191
yansi.workspace = true
9292
tempfile.workspace = true
9393
itertools.workspace = true
94-
rand.workspace = true
9594
rand_08.workspace = true
9695
eyre.workspace = true
9796

@@ -110,6 +109,7 @@ clap_complete_fig = "4"
110109
[dev-dependencies]
111110
alloy-provider = { workspace = true, features = ["txpool-api"] }
112111
alloy-pubsub.workspace = true
112+
rand.workspace = true
113113
foundry-test-utils.workspace = true
114114
tokio = { workspace = true, features = ["full"] }
115115

crates/anvil/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Anvil is a fast local Ethereum development node.
22
33
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
4+
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
45

56
use crate::{
67
eth::{

crates/cast/Cargo.toml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ alloy-signer.workspace = true
5353
alloy-sol-types.workspace = true
5454
alloy-transport.workspace = true
5555
alloy-ens = { workspace = true, features = ["provider"] }
56-
alloy-hardforks.workspace = true
5756

5857
op-alloy-flz.workspace = true
5958
op-alloy-consensus = { workspace = true, features = ["alloy-compat"] }
@@ -68,12 +67,6 @@ rayon.workspace = true
6867
serde_json.workspace = true
6968
serde.workspace = true
7069

71-
# aws-kms
72-
aws-sdk-kms = { workspace = true, default-features = false, optional = true }
73-
74-
# gcp-kms
75-
gcloud-sdk = { version = "0.27", default-features = false, optional = true }
76-
7770
# bin
7871
foundry-cli.workspace = true
7972

@@ -95,13 +88,14 @@ evmole.workspace = true
9588
[dev-dependencies]
9689
anvil.workspace = true
9790
foundry-test-utils.workspace = true
91+
alloy-hardforks.workspace = true
9892

9993
[features]
10094
default = ["jemalloc"]
10195
asm-keccak = ["alloy-primitives/asm-keccak"]
10296
jemalloc = ["foundry-cli/jemalloc"]
10397
mimalloc = ["foundry-cli/mimalloc"]
10498
tracy-allocator = ["foundry-cli/tracy-allocator"]
105-
aws-kms = ["foundry-wallets/aws-kms", "dep:aws-sdk-kms"]
106-
gcp-kms = ["foundry-wallets/gcp-kms", "dep:gcloud-sdk"]
107-
isolate-by-default = ["foundry-config/isolate-by-default"]
99+
aws-kms = ["foundry-wallets/aws-kms"]
100+
gcp-kms = ["foundry-wallets/gcp-kms"]
101+
isolate-by-default = ["foundry-config/isolate-by-default"]

crates/cast/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Cast is a Swiss Army knife for interacting with Ethereum applications from the command line.
22
33
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
4+
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
45

56
use alloy_consensus::TxEnvelope;
67
use alloy_dyn_abi::{DynSolType, DynSolValue, FunctionExt};

crates/chisel/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Chisel is a fast, utilitarian, and verbose Solidity REPL.
22
33
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
4+
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
45

56
#[macro_use]
67
extern crate foundry_common;

crates/common/fmt/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! Helpers for formatting Ethereum types.
22
3+
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
4+
35
mod console;
46
pub use console::{console_format, ConsoleFmt, FormatSpec};
57

crates/forge/Cargo.toml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ foundry-compilers = { workspace = true, features = ["full"] }
3030
foundry-config.workspace = true
3131
foundry-evm.workspace = true
3232
foundry-evm-core.workspace = true
33-
foundry-wallets.workspace = true
3433
foundry-linking.workspace = true
35-
forge-script-sequence.workspace = true
3634

3735
comfy-table.workspace = true
3836
eyre.workspace = true
@@ -63,31 +61,26 @@ alloy-rpc-types.workspace = true
6361
alloy-serde.workspace = true
6462
alloy-signer.workspace = true
6563
alloy-transport.workspace = true
66-
alloy-hardforks.workspace = true
6764

6865
revm.workspace = true
6966

7067
clap = { version = "4", features = ["derive", "env", "unicode", "wrap_help"] }
7168
clap_complete = "4"
7269
clap_complete_fig = "4"
7370
dunce.workspace = true
74-
futures.workspace = true
7571
indicatif.workspace = true
7672
inferno = { version = "0.12", default-features = false }
7773
itertools.workspace = true
7874
parking_lot.workspace = true
7975
regex = { workspace = true, default-features = false }
80-
reqwest = { workspace = true, features = ["json"] }
8176
semver.workspace = true
8277
serde_json.workspace = true
8378
similar = { version = "2", features = ["inline"] }
8479
solang-parser.workspace = true
8580
solar-parse.workspace = true
86-
solar-interface.workspace = true
8781
strum = { workspace = true, features = ["derive"] }
8882
thiserror.workspace = true
8983
tokio = { workspace = true, features = ["time"] }
90-
toml = { workspace = true, features = ["preserve_order"] }
9184
toml_edit = "0.22"
9285
watchexec = "8.0"
9386
watchexec-events = "6.0"
@@ -105,8 +98,13 @@ soldeer-commands.workspace = true
10598
quick-junit = "0.5.0"
10699

107100
[dev-dependencies]
101+
alloy-hardforks.workspace = true
108102
anvil.workspace = true
103+
forge-script-sequence.workspace = true
109104
foundry-test-utils.workspace = true
105+
foundry-wallets.workspace = true
106+
futures.workspace = true
107+
reqwest = { workspace = true, features = ["json"] }
110108

111109
mockall = "0.13"
112110
globset = "0.4"

crates/forge/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! Forge is a fast and flexible Ethereum testing framework.
22
3+
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
34
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
45

56
#[macro_use]

crates/script-sequence/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Script Sequence and related types.
2+
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
23

34
#[macro_use]
45
extern crate foundry_common;

0 commit comments

Comments
 (0)