From afcbc1d86d272527aa338f1fa8c998f54a39401a Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 13 May 2024 18:42:50 +0200 Subject: chore(tvix/clippy): configure clippy allow block_in_conditions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … in Cargo.toml. This gets an imperative `cargo clippy` run to pick up that config, so `-A clippy::blocks_in_conditions` doesn't need to be explicitly specified anymore. Change-Id: I32b6cc50c77c22cba0d816d0db508c2f94b2c383 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11659 Autosubmit: flokli Reviewed-by: edef Tested-by: BuildkiteCI --- tvix/Cargo.toml | 5 +++++ tvix/build/Cargo.toml | 3 +++ tvix/castore/Cargo.toml | 3 +++ tvix/default.nix | 4 +--- tvix/store/Cargo.toml | 3 +++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tvix/Cargo.toml b/tvix/Cargo.toml index 6cd19831dc..847d9aceec 100644 --- a/tvix/Cargo.toml +++ b/tvix/Cargo.toml @@ -30,6 +30,11 @@ members = [ "store", ] +[workspace.lints.clippy] +# Allow blocks_in_conditions due to false positives with #[tracing::instrument(…)]: +# https://github.com/rust-lang/rust-clippy/issues/12281 +blocks_in_conditions = "allow" + # Add a profile to all targets that enables release optimisations, but # retains debug symbols. This is great for use with # benchmarking/profiling tools. diff --git a/tvix/build/Cargo.toml b/tvix/build/Cargo.toml index 626fd35d77..dc676b1813 100644 --- a/tvix/build/Cargo.toml +++ b/tvix/build/Cargo.toml @@ -31,3 +31,6 @@ tonic-reflection = ["dep:tonic-reflection"] [dev-dependencies] rstest = "0.19.0" + +[lints] +workspace = true diff --git a/tvix/castore/Cargo.toml b/tvix/castore/Cargo.toml index 2797ef08f2..1b317be739 100644 --- a/tvix/castore/Cargo.toml +++ b/tvix/castore/Cargo.toml @@ -116,3 +116,6 @@ tonic-reflection = ["dep:tonic-reflection"] # Requires the following packages in $PATH: # cbtemulator, google-cloud-bigtable-tool integration = [] + +[lints] +workspace = true diff --git a/tvix/default.nix b/tvix/default.nix index f562cf37de..a3a4d35df6 100644 --- a/tvix/default.nix +++ b/tvix/default.nix @@ -224,9 +224,7 @@ in rustPlatform.cargoSetupHook ]; - # Allow blocks_in_conditions due to false positives with #[tracing::instrument(…)]: - # https://github.com/rust-lang/rust-clippy/issues/12281 - buildPhase = "cargo clippy --tests --all-features --benches --examples -- -Dwarnings -A clippy::blocks_in_conditions | tee $out"; + buildPhase = "cargo clippy --tests --all-features --benches --examples -- -Dwarnings | tee $out"; }; meta.ci.targets = [ diff --git a/tvix/store/Cargo.toml b/tvix/store/Cargo.toml index b362a87ffb..26bd249b12 100644 --- a/tvix/store/Cargo.toml +++ b/tvix/store/Cargo.toml @@ -79,3 +79,6 @@ virtiofs = ["tvix-castore/virtiofs"] # Requires the following packages in $PATH: # cbtemulator, google-cloud-bigtable-tool integration = [] + +[lints] +workspace = true -- cgit 1.4.1