Skip to content

Commit a43e40a

Browse files
committed
introduce workspace lints, warn on unused crates
In practice this will forbid unused dependencies because we run clippy with `--deny warnings`. Workspace lints is a nice place to ratchet up lints through the codebase all at once and consistently.
1 parent 65489e1 commit a43e40a

File tree

19 files changed

+57
-0
lines changed

19 files changed

+57
-0
lines changed

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ tokio = { version = "1.24.0", default-features = false }
103103
which = { version = "7.0.0", default-features = false }
104104
xdpilone = { version = "1.0.5", default-features = false }
105105

106+
[workspace.lints.rust]
107+
unused-extern-crates = "warn"
108+
106109
[profile.release.package.integration-ebpf]
107110
debug = 2
108111
codegen-units = 1

aya-build/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ homepage.workspace = true
99
rust-version.workspace = true
1010
edition.workspace = true
1111

12+
[lints]
13+
workspace = true
14+
1215
[dependencies]
1316
anyhow = { workspace = true, default-features = true }
1417
cargo_metadata = { workspace = true }

aya-ebpf-macros/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ homepage.workspace = true
99
rust-version.workspace = true
1010
edition.workspace = true
1111

12+
[lints]
13+
workspace = true
14+
1215
[lib]
1316
proc-macro = true
1417

aya-log-common/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ homepage.workspace = true
1111
rust-version.workspace = true
1212
edition.workspace = true
1313

14+
[lints]
15+
workspace = true
16+
1417
[dependencies]
1518
num_enum = { workspace = true }
1619

aya-log-ebpf-macros/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ homepage.workspace = true
99
rust-version.workspace = true
1010
edition.workspace = true
1111

12+
[lints]
13+
workspace = true
14+
1215
[dependencies]
1316
aya-log-common = { path = "../aya-log-common", version = "^0.1.14", default-features = false }
1417
aya-log-parser = { path = "../aya-log-parser", version = "^0.1.13", default-features = false }

aya-log-parser/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ homepage.workspace = true
99
rust-version.workspace = true
1010
edition.workspace = true
1111

12+
[lints]
13+
workspace = true
14+
1215
[dependencies]
1316
aya-log-common = { path = "../aya-log-common", version = "^0.1.14", default-features = false }
1417

aya-log/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ homepage.workspace = true
1212
rust-version.workspace = true
1313
edition.workspace = true
1414

15+
[lints]
16+
workspace = true
17+
1518
[dependencies]
1619
aya = { path = "../aya", version = "^0.13.1", features = ["async_tokio"] }
1720
aya-log-common = { path = "../aya-log-common", version = "^0.1.15", default-features = false }

aya-obj/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ homepage.workspace = true
1212
rust-version.workspace = true
1313
edition.workspace = true
1414

15+
[lints]
16+
workspace = true
17+
1518
[dependencies]
1619
bytes = { workspace = true }
1720
hashbrown = { workspace = true, default-features = true }

aya-tool/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ homepage.workspace = true
1010
rust-version.workspace = true
1111
edition.workspace = true
1212

13+
[lints]
14+
workspace = true
15+
1316
[dependencies]
1417
bindgen = { workspace = true, default-features = true }
1518
clap = { workspace = true, default-features = true, features = ["derive"] }

aya/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ homepage.workspace = true
1212
rust-version.workspace = true
1313
edition.workspace = true
1414

15+
[lints]
16+
workspace = true
17+
1518
[dependencies]
1619
assert_matches = { workspace = true }
1720
async-io = { workspace = true, optional = true }

ebpf/aya-ebpf-bindings/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ repository.workspace = true
88
homepage.workspace = true
99
edition.workspace = true
1010

11+
[lints]
12+
workspace = true
13+
1114
[dependencies]
1215
aya-ebpf-cty = { version = "^0.2.2", path = "../aya-ebpf-cty" }

ebpf/aya-ebpf-cty/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ repository.workspace = true
1010
homepage.workspace = true
1111
rust-version.workspace = true
1212
edition.workspace = true
13+
14+
[lints]
15+
workspace = true

ebpf/aya-ebpf/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ homepage.workspace = true
99
rust-version.workspace = true
1010
edition.workspace = true
1111

12+
[lints]
13+
workspace = true
14+
1215
[dependencies]
1316
aya-ebpf-cty = { version = "^0.2.2", path = "../aya-ebpf-cty" }
1417
aya-ebpf-macros = { version = "^0.1.1", path = "../../aya-ebpf-macros" }

ebpf/aya-log-ebpf/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ homepage.workspace = true
99
rust-version.workspace = true
1010
edition.workspace = true
1111

12+
[lints]
13+
workspace = true
14+
1215
[dependencies]
1316
aya-ebpf = { version = "^0.1.1", path = "../aya-ebpf" }
1417
aya-log-common = { version = "^0.1.15", path = "../../aya-log-common" }

init/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ homepage.workspace = true
99
rust-version.workspace = true
1010
edition.workspace = true
1111

12+
[lints]
13+
workspace = true
14+
1215
[dependencies]
1316
anyhow = { workspace = true, features = ["std"] }
1417
nix = { workspace = true, features = ["fs", "mount", "reboot"] }

test/integration-common/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ homepage.workspace = true
99
rust-version.workspace = true
1010
edition.workspace = true
1111

12+
[lints]
13+
workspace = true
14+
1215
[dependencies]
1316
aya = { path = "../../aya", optional = true }
1417

test/integration-ebpf/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ homepage.workspace = true
99
rust-version.workspace = true
1010
edition.workspace = true
1111

12+
[lints]
13+
workspace = true
14+
1215
[dependencies]
1316
aya-ebpf = { path = "../../ebpf/aya-ebpf" }
1417
aya-log-ebpf = { path = "../../ebpf/aya-log-ebpf" }

test/integration-test/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ homepage.workspace = true
99
rust-version.workspace = true
1010
edition.workspace = true
1111

12+
[lints]
13+
workspace = true
14+
1215
[dependencies]
1316
anyhow = { workspace = true, features = ["std"] }
1417
assert_matches = { workspace = true }

xtask/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ homepage.workspace = true
99
rust-version.workspace = true
1010
edition.workspace = true
1111

12+
[lints]
13+
workspace = true
14+
1215
[dependencies]
1316
anyhow = { workspace = true, features = ["std"] }
1417
aya-tool = { path = "../aya-tool", version = "0.1.0", default-features = false }

0 commit comments

Comments
 (0)