Skip to content

Commit cc5f58e

Browse files
goffrieConvex, Inc.
authored and
Convex, Inc.
committed
Move clippy lints to workspace Cargo.toml (#32633)
GitOrigin-RevId: cffc0f359ba36d6f3aaaa75ddf55b7e2c0640da7
1 parent 36270f3 commit cc5f58e

File tree

47 files changed

+198
-38
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+198
-38
lines changed

.cargo/config.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ CARGO_WORKSPACE_ROOT = { value = "", relative = true }
33
CHRONO_TZ_TIMEZONE_FILTER = "US/Pacific"
44

55
[target.aarch64-unknown-linux-gnu]
6-
rustflags = ["-Ctarget-cpu=neoverse-n1", "-Anon_local_definitions"]
6+
rustflags = ["-Ctarget-cpu=neoverse-n1"]
77

88
[target.aarch64-apple-darwin]
9-
rustflags = ["-Ctarget-cpu=apple-m1", "-Anon_local_definitions"]
9+
rustflags = ["-Ctarget-cpu=apple-m1"]
1010

1111
[target.x86_64-pc-windows-msvc]
1212
# FORCE:MULTIPLE is a bit sketchy. v8 and rocksdb both export the same symbol.
1313
# This seems to work around it to build on windows, but it's not ideal.
14-
rustflags = ["-Clink-arg=/FORCE:MULTIPLE", "-Clink-arg=/STACK:4194304", "-Anon_local_definitions"]
14+
rustflags = ["-Clink-arg=/FORCE:MULTIPLE", "-Clink-arg=/STACK:4194304"]
1515

1616
[target.'cfg(all())']
17-
rustflags = ["--cfg", "tokio_unstable", "-Anon_local_definitions"]
17+
rustflags = ["--cfg", "tokio_unstable"]
1818

1919
[net]
2020
git-fetch-with-cli = true

Cargo.toml

+18
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,24 @@ strip = "debuginfo"
174174
[patch.crates-io]
175175
prometheus = { git = "https://github.com/get-convex/rust-prometheus", rev = "061619b6e44ca7f3b94d97346152cab319895929" }
176176

177+
[workspace.lints.rust]
178+
unused_extern_crates = "warn"
179+
180+
[workspace.lints.clippy]
181+
await_holding_lock = "warn"
182+
await_holding_refcell_ref = "warn"
183+
large_enum_variant = "allow"
184+
manual_map = "allow"
185+
new_without_default = "allow"
186+
op_ref = "allow"
187+
ptr_arg = "allow"
188+
single_match = "allow"
189+
too_many_arguments = "allow"
190+
type_complexity = "allow"
191+
upper_case_acronyms = "allow"
192+
useless_format = "allow"
193+
useless_vec = "allow"
194+
177195
[profile.dev.package.proptest]
178196
opt-level = 3
179197
codegen-units = 16

crates/application/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,6 @@ testing = [
126126
"value/testing",
127127
"vector/testing",
128128
]
129+
130+
[lints]
131+
workspace = true

crates/async_lru/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ rand = { workspace = true }
2828
runtime = { path = "../runtime", features = ["testing"] }
2929
tokio = { workspace = true }
3030
value = { path = "../value", features = ["testing"] }
31+
32+
[lints]
33+
workspace = true

crates/authentication/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ testing = [
4545
"keybroker/testing",
4646
"metrics/testing",
4747
]
48+
49+
[lints]
50+
workspace = true

crates/cmd_util/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ sentry-tracing = { workspace = true }
1313
tracing = { workspace = true }
1414
tracing-appender = { workspace = true }
1515
tracing-subscriber = { workspace = true }
16+
17+
[lints]
18+
workspace = true

crates/common/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,6 @@ testing = [
122122
"value/testing",
123123
"tokio/test-util",
124124
]
125+
126+
[lints]
127+
workspace = true

crates/config_loader/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ convex_macro = { path = "../../crates/convex_macro" }
2020
pb = { path = "../../crates/pb" }
2121
runtime = { path = "../../crates/runtime", features = ["testing"] }
2222
tempfile = { workspace = true }
23+
24+
[lints]
25+
workspace = true

crates/convex/Cargo.oss.toml

+18
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,21 @@ native-tls-vendored = [ "tokio-tungstenite/native-tls-vendored" ]
4949
rustls-tls-native-roots = [ "tokio-tungstenite/rustls-tls-native-roots" ]
5050
rustls-tls-webpki-roots = [ "tokio-tungstenite/rustls-tls-webpki-roots" ]
5151
testing = [ "convex_sync_types/testing", "proptest", "proptest-derive", "parking_lot" ]
52+
53+
[lints.rust]
54+
unused_extern_crates = "warn"
55+
56+
[lints.clippy]
57+
await_holding_lock = "warn"
58+
await_holding_refcell_ref = "warn"
59+
large_enum_variant = "allow"
60+
manual_map = "allow"
61+
new_without_default = "allow"
62+
op_ref = "allow"
63+
ptr_arg = "allow"
64+
single_match = "allow"
65+
too_many_arguments = "allow"
66+
type_complexity = "allow"
67+
upper_case_acronyms = "allow"
68+
useless_format = "allow"
69+
useless_vec = "allow"

crates/convex/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,6 @@ testing = [
5959
"proptest-derive",
6060
"parking_lot",
6161
]
62+
63+
[lints]
64+
workspace = true

crates/convex/sync_types/Cargo.oss.toml

+18
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,21 @@ proptest-derive = { version = "0.5.0" }
2828

2929
[features]
3030
testing = [ "proptest", "proptest-derive" ]
31+
32+
[lints.rust]
33+
unused_extern_crates = "warn"
34+
35+
[lints.clippy]
36+
await_holding_lock = "warn"
37+
await_holding_refcell_ref = "warn"
38+
large_enum_variant = "allow"
39+
manual_map = "allow"
40+
new_without_default = "allow"
41+
op_ref = "allow"
42+
ptr_arg = "allow"
43+
single_match = "allow"
44+
too_many_arguments = "allow"
45+
type_complexity = "allow"
46+
upper_case_acronyms = "allow"
47+
useless_format = "allow"
48+
useless_vec = "allow"

crates/convex/sync_types/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ proptest-derive = { workspace = true }
3131

3232
[features]
3333
testing = ["proptest", "proptest-derive"]
34+
35+
[lints]
36+
workspace = true

crates/convex_macro/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ syn = { workspace = true }
1616

1717
[dev-dependencies]
1818
anyhow = { workspace = true }
19+
20+
[lints]
21+
workspace = true

crates/database/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,6 @@ testing = [
104104

105105
[package.metadata.cargo-udeps.ignore]
106106
development = ["criterion"] # udeps can't tell this is used by benchmarks
107+
108+
[lints]
109+
workspace = true

crates/errors/Cargo.toml

+4-5
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ proptest = { workspace = true }
2727
proptest-derive = { workspace = true }
2828

2929
[features]
30-
testing = [
31-
"metrics/testing",
32-
"proptest",
33-
"proptest-derive",
34-
]
30+
testing = ["metrics/testing", "proptest", "proptest-derive"]
31+
32+
[lints]
33+
workspace = true

crates/events/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ testing = [
3131
]
3232

3333
[package.metadata.cargo-machete]
34-
ignored = [
35-
"proptest",
36-
"proptest-derive",
37-
]
34+
ignored = ["proptest", "proptest-derive"]
35+
36+
[lints]
37+
workspace = true

crates/file_storage/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ runtime = { path = "../runtime", features = ["testing"] }
3838
storage = { path = "../storage", features = ["testing"] }
3939
usage_tracking = { path = "../usage_tracking", features = ["testing"] }
4040
value = { path = "../value", features = ["testing"] }
41+
42+
[lints]
43+
workspace = true

crates/fivetran_common/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ ignored = [
4141

4242
[features]
4343
testing = ["proptest"]
44+
45+
[lints]
46+
workspace = true

crates/fivetran_destination/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ ignored = [
5454
# Prost required via tonic macro
5555
"prost",
5656
]
57+
58+
[lints]
59+
workspace = true

crates/fivetran_source/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,6 @@ ignored = [
5656
# Prost required via tonic macro
5757
"prost",
5858
]
59+
60+
[lints]
61+
workspace = true

crates/function_runner/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,6 @@ testing = [
7171
"value/testing",
7272
]
7373
tracy-tracing = ["common/tracy-tracing"]
74+
75+
[lints]
76+
workspace = true

crates/http_client/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ metrics = { path = "../metrics", features = ["testing"] }
2424
tokio = { workspace = true }
2525

2626
[features]
27+
28+
[lints]
29+
workspace = true

crates/imbl_slab/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ development = ["proptest", "proptest-derive"]
1414

1515
[dependencies]
1616
imbl = { workspace = true }
17+
18+
[lints]
19+
workspace = true

crates/indexing/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@ testing = [
4343
[[bench]]
4444
name = "index_registry"
4545
harness = false
46+
47+
[lints]
48+
workspace = true

crates/isolate/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,6 @@ ignored = [
145145
# Generated code depends on phf
146146
"phf",
147147
]
148+
149+
[lints]
150+
workspace = true

crates/keybroker/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,6 @@ testing = [
4848
"rsa",
4949
"runtime/testing",
5050
]
51+
52+
[lints]
53+
workspace = true

crates/local_backend/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,6 @@ usage_tracking = { path = "../../crates/usage_tracking", features = [
9090
] }
9191
value = { path = "../../crates/value", features = ["testing"] }
9292
vector = { path = "../../crates/vector", features = ["testing"] }
93+
94+
[lints]
95+
workspace = true

crates/metrics/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,7 @@ tracing = { workspace = true }
2121
testing = []
2222

2323
[package.metadata.cargo-machete]
24-
ignored = ["vergen"] # Build dependencies not understood
24+
ignored = ["vergen"] # Build dependencies not understood
25+
26+
[lints]
27+
workspace = true

crates/model/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,6 @@ testing = [
8080
"storage/testing",
8181
"value/testing",
8282
]
83+
84+
[lints]
85+
workspace = true

crates/node_executor/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,6 @@ testing = [
6161
"storage/testing",
6262
"value/testing",
6363
]
64+
65+
[lints]
66+
workspace = true

crates/packed_value/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ proptest = { workspace = true }
2626
value = { path = "../value", features = ["testing"] }
2727

2828
[features]
29-
testing = [
30-
"proptest",
31-
"value/testing",
32-
]
29+
testing = ["proptest", "value/testing"]
3330

3431
[[bench]]
3532
name = "packed_value"
3633
harness = false
34+
35+
[lints]
36+
workspace = true

crates/pb/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ ignored = [
3434
# Build dependencies not understood
3535
"pb_build",
3636
]
37+
38+
[lints]
39+
workspace = true

crates/pb_build/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ ignored = [
1717
"cfg_if",
1818
"tonic_build",
1919
]
20+
21+
[lints]
22+
workspace = true

crates/postgres/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ proptest = { workspace = true }
3434
tokio = { workspace = true }
3535

3636
[features]
37-
testing = [
38-
"common/testing",
39-
"metrics/testing",
40-
]
37+
testing = ["common/testing", "metrics/testing"]
4138

4239
[package.metadata.cargo-machete]
4340
ignored = [
4441
# proptest_derive macro depends on proptest
4542
"proptest",
4643
]
44+
45+
[lints]
46+
workspace = true

crates/runtime/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ metrics = { path = "../metrics", features = ["testing"] }
2626

2727
[features]
2828
testing = ["common/testing", "metrics/testing"]
29+
30+
[lints]
31+
workspace = true

crates/search/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,6 @@ testing = [
8585
[[bench]]
8686
name = "memory_index"
8787
harness = false
88+
89+
[lints]
90+
workspace = true

crates/shape_inference/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ sync_types = { package = "convex_sync_types", path = "../convex/sync_types" }
2626
value = { path = "../value", features = ["testing"] }
2727

2828
[features]
29-
testing = [
30-
"proptest",
31-
"value/testing",
32-
]
29+
testing = ["proptest", "value/testing"]
30+
31+
[lints]
32+
workspace = true

crates/simulation/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,6 @@ testing = [
103103
"proptest",
104104
"proptest-derive",
105105
]
106+
107+
[lints]
108+
workspace = true

crates/sqlite/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ ignored = [
2828
# persistence_test_suite macro depends on tokio
2929
"tokio",
3030
]
31+
32+
[lints]
33+
workspace = true

crates/storage/Cargo.toml

+4-5
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ runtime = { path = "../runtime", features = ["testing"] }
4242
value = { path = "../value", features = ["testing"] }
4343

4444
[features]
45-
testing = [
46-
"common/testing",
47-
"runtime/testing",
48-
"value/testing",
49-
]
45+
testing = ["common/testing", "runtime/testing", "value/testing"]
46+
47+
[lints]
48+
workspace = true

crates/sync/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,6 @@ testing = [
5858
"proptest",
5959
"proptest-derive",
6060
]
61+
62+
[lints]
63+
workspace = true

0 commit comments

Comments
 (0)