This is an automated email from the ASF dual-hosted git repository.

kriskras99 pushed a commit to branch feat/clippy_config
in repository https://gitbox.apache.org/repos/asf/avro-rs.git

commit 8048dad0b89bfcfeb1b7226509c514c207e09e39
Author: default <[email protected]>
AuthorDate: Thu Dec 18 10:30:14 2025 +0000

    feat: Configure Clippy in the workspace instead of the CI
    
    This way developers can run Clippy locally and get the same errors as
    on the CI. They've been configured as warnings, to ease development,
    and will only be errors in the CI.
---
 .github/workflows/test-lang-rust-clippy.yml | 2 +-
 Cargo.toml                                  | 4 ++++
 avro/Cargo.toml                             | 3 +++
 avro_derive/Cargo.toml                      | 3 +++
 avro_test_helper/Cargo.toml                 | 3 +++
 wasm-demo/Cargo.toml                        | 3 +++
 6 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/test-lang-rust-clippy.yml 
b/.github/workflows/test-lang-rust-clippy.yml
index 0abfbc0..08dff44 100644
--- a/.github/workflows/test-lang-rust-clippy.yml
+++ b/.github/workflows/test-lang-rust-clippy.yml
@@ -47,4 +47,4 @@ jobs:
         with:
           toolchain: ${{ matrix.rust }}
           components: clippy
-      - run: cargo clippy --all-features --all-targets -- -Dclippy::all 
-Dunused_imports
+      - run: cargo clippy --all-features --all-targets -- -Dwarnings
diff --git a/Cargo.toml b/Cargo.toml
index ae290bf..f175553 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -49,3 +49,7 @@ pretty_assertions = { default-features = false, version = 
"1.4.1", features = ["
 [profile.release.package.hello-wasm]
 # Tell `rustc` to optimize for small code size.
 opt-level = "s"
+
+[workspace.lints]
+# By setting the priority to -1, this lint group can be overridden for 
specific lints
+clippy.all = { level = "warn", priority = -1 }
diff --git a/avro/Cargo.toml b/avro/Cargo.toml
index 5f906cd..a28658e 100644
--- a/avro/Cargo.toml
+++ b/avro/Cargo.toml
@@ -95,3 +95,6 @@ rstest = { default-features = false, version = "0.26.1" }
 [package.metadata.docs.rs]
 all-features = true
 rustdoc-args = ["--cfg", "docsrs"]
+
+[lints]
+workspace = true
diff --git a/avro_derive/Cargo.toml b/avro_derive/Cargo.toml
index 832dc90..9b13bd3 100644
--- a/avro_derive/Cargo.toml
+++ b/avro_derive/Cargo.toml
@@ -46,3 +46,6 @@ pretty_assertions = { workspace = true }
 
 [package.metadata.docs.rs]
 rustdoc-args = ["--cfg", "docsrs"]
+
+[lints]
+workspace = true
diff --git a/avro_test_helper/Cargo.toml b/avro_test_helper/Cargo.toml
index 0f8af30..6b28456 100644
--- a/avro_test_helper/Cargo.toml
+++ b/avro_test_helper/Cargo.toml
@@ -35,3 +35,6 @@ better-panic = { default-features = false, version = "0.3.0" }
 ctor = { default-features = false, version = "0.6.3", features = ["dtor", 
"proc_macro"]  }
 env_logger = { default-features = false, version = "0.11.8" }
 log = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/wasm-demo/Cargo.toml b/wasm-demo/Cargo.toml
index 960884d..c9bfe50 100644
--- a/wasm-demo/Cargo.toml
+++ b/wasm-demo/Cargo.toml
@@ -41,3 +41,6 @@ wasm-bindgen = "0.2.97"
 [dev-dependencies]
 console_error_panic_hook = { version = "0.1.7" }
 wasm-bindgen-test = "0.3.56"
+
+[lints]
+workspace = true

Reply via email to