From 6cde00073fb24046298885679855e62acec14b56 Mon Sep 17 00:00:00 2001 From: Gwen Lg Date: Sun, 25 Jan 2026 23:42:18 +0100 Subject: [PATCH] chore: enable workspace configuration of lints in Cargo.toml and use workspace configuration in each package. This allow to customize clippy and rust lint configuration for project. No particular configuration in this commit. --- Cargo.toml | 3 +++ src/api/admin/Cargo.toml | 3 +++ src/api/common/Cargo.toml | 3 +++ src/api/k2v/Cargo.toml | 3 +++ src/api/s3/Cargo.toml | 3 +++ src/block/Cargo.toml | 3 +++ src/db/Cargo.toml | 3 +++ src/garage/Cargo.toml | 3 +++ src/k2v-client/Cargo.toml | 3 +++ src/model/Cargo.toml | 3 +++ src/net/Cargo.toml | 3 +++ src/rpc/Cargo.toml | 3 +++ src/table/Cargo.toml | 3 +++ src/util/Cargo.toml | 3 +++ src/web/Cargo.toml | 3 +++ 15 files changed, 45 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index be2e95a8..aba0b354 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -179,3 +179,6 @@ lto = "thin" codegen-units = 16 opt-level = 3 strip = "debuginfo" + +[workspace.lints.clippy] +# custom configuration diff --git a/src/api/admin/Cargo.toml b/src/api/admin/Cargo.toml index c8bc3423..4d46509a 100644 --- a/src/api/admin/Cargo.toml +++ b/src/api/admin/Cargo.toml @@ -48,3 +48,6 @@ prometheus = { workspace = true, optional = true } [features] metrics = ["opentelemetry-prometheus", "prometheus"] k2v = ["garage_model/k2v"] + +[lints] +workspace = true diff --git a/src/api/common/Cargo.toml b/src/api/common/Cargo.toml index ba38c63b..dba58202 100644 --- a/src/api/common/Cargo.toml +++ b/src/api/common/Cargo.toml @@ -45,3 +45,6 @@ serde.workspace = true serde_json.workspace = true opentelemetry.workspace = true + +[lints] +workspace = true diff --git a/src/api/k2v/Cargo.toml b/src/api/k2v/Cargo.toml index d99c3411..2d417a7e 100644 --- a/src/api/k2v/Cargo.toml +++ b/src/api/k2v/Cargo.toml @@ -35,3 +35,6 @@ serde.workspace = true serde_json.workspace = true opentelemetry.workspace = true + +[lints] +workspace = true diff --git a/src/api/s3/Cargo.toml b/src/api/s3/Cargo.toml index e12df677..620c8c4a 100644 --- a/src/api/s3/Cargo.toml +++ b/src/api/s3/Cargo.toml @@ -58,3 +58,6 @@ serde_json.workspace = true quick-xml.workspace = true opentelemetry.workspace = true + +[lints] +workspace = true diff --git a/src/block/Cargo.toml b/src/block/Cargo.toml index b45898a2..a37ac825 100644 --- a/src/block/Cargo.toml +++ b/src/block/Cargo.toml @@ -40,3 +40,6 @@ tokio-util.workspace = true [features] system-libs = ["zstd/pkg-config"] + +[lints] +workspace = true diff --git a/src/db/Cargo.toml b/src/db/Cargo.toml index 40134169..7e431286 100644 --- a/src/db/Cargo.toml +++ b/src/db/Cargo.toml @@ -33,3 +33,6 @@ bundled-libs = ["rusqlite?/bundled"] lmdb = ["heed"] fjall = ["dep:fjall", "dep:parking_lot"] sqlite = ["rusqlite", "r2d2", "r2d2_sqlite"] + +[lints] +workspace = true diff --git a/src/garage/Cargo.toml b/src/garage/Cargo.toml index 8b726a86..9175ec6b 100644 --- a/src/garage/Cargo.toml +++ b/src/garage/Cargo.toml @@ -119,3 +119,6 @@ system-libs = [ "garage_rpc/system-libs", "sodiumoxide/use-pkg-config", ] + +[lints] +workspace = true diff --git a/src/k2v-client/Cargo.toml b/src/k2v-client/Cargo.toml index ccbc7aa3..3c1076c0 100644 --- a/src/k2v-client/Cargo.toml +++ b/src/k2v-client/Cargo.toml @@ -45,3 +45,6 @@ path = "lib.rs" name = "k2v-cli" path = "bin/k2v-cli.rs" required-features = ["cli"] + +[lints] +workspace = true diff --git a/src/model/Cargo.toml b/src/model/Cargo.toml index 0f8d040c..80c2f61e 100644 --- a/src/model/Cargo.toml +++ b/src/model/Cargo.toml @@ -46,3 +46,6 @@ k2v = ["garage_util/k2v"] lmdb = ["garage_db/lmdb"] sqlite = ["garage_db/sqlite"] fjall = ["garage_db/fjall"] + +[lints] +workspace = true diff --git a/src/net/Cargo.toml b/src/net/Cargo.toml index 0d146ae1..314f748a 100644 --- a/src/net/Cargo.toml +++ b/src/net/Cargo.toml @@ -42,3 +42,6 @@ opentelemetry-contrib = { workspace = true, optional = true } [dev-dependencies] pretty_env_logger.workspace = true + +[lints] +workspace = true diff --git a/src/rpc/Cargo.toml b/src/rpc/Cargo.toml index 1c35dcd9..4f030540 100644 --- a/src/rpc/Cargo.toml +++ b/src/rpc/Cargo.toml @@ -51,3 +51,6 @@ opentelemetry.workspace = true kubernetes-discovery = ["kube", "k8s-openapi", "schemars"] consul-discovery = ["reqwest", "thiserror"] system-libs = ["sodiumoxide/use-pkg-config"] + +[lints] +workspace = true diff --git a/src/table/Cargo.toml b/src/table/Cargo.toml index 3495380f..7739f18f 100644 --- a/src/table/Cargo.toml +++ b/src/table/Cargo.toml @@ -33,3 +33,6 @@ serde_bytes.workspace = true futures.workspace = true futures-util.workspace = true tokio.workspace = true + +[lints] +workspace = true diff --git a/src/util/Cargo.toml b/src/util/Cargo.toml index 48d39872..a2478119 100644 --- a/src/util/Cargo.toml +++ b/src/util/Cargo.toml @@ -52,3 +52,6 @@ mktemp.workspace = true [features] k2v = [] + +[lints] +workspace = true diff --git a/src/web/Cargo.toml b/src/web/Cargo.toml index ba0ecc04..e21ff4ab 100644 --- a/src/web/Cargo.toml +++ b/src/web/Cargo.toml @@ -31,3 +31,6 @@ hyper.workspace = true tokio.workspace = true opentelemetry.workspace = true + +[lints] +workspace = true