From 0272aed9e464a45b07874d4c9e99ec9d963fac50 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Thu, 4 Nov 2021 00:03:26 +0100 Subject: [PATCH] Turn deny lints into warn This makes local development easier, since warnings do not fail compilation. On CI all warnings are denied anyway, so it will not pass. --- CONTRIBUTING.md | 1 + serde_with/src/lib.rs | 5 +++-- serde_with_macros/src/lib.rs | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 49f77b24..1ac67db0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,6 +34,7 @@ This repository provides a devcontainer setup, which can be used with VS Code or * A changelog entry can also be added. 3. Contributions must pass `cargo clippy` and `cargo fmt`. This is also checked by CI and needs to pass before the PR can be merged. + The CI does not allow any warnings in the compiled code. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall diff --git a/serde_with/src/lib.rs b/serde_with/src/lib.rs index b5eb000f..cae1105e 100644 --- a/serde_with/src/lib.rs +++ b/serde_with/src/lib.rs @@ -1,8 +1,10 @@ -#![deny( +#![warn( + clippy::semicolon_if_nothing_returned, missing_copy_implementations, // missing_crate_level_docs, not available in MSRV missing_debug_implementations, missing_docs, + rust_2018_idioms, trivial_casts, trivial_numeric_casts, unused_extern_crates, @@ -10,7 +12,6 @@ unused_qualifications, variant_size_differences )] -#![warn(rust_2018_idioms)] #![doc(test(attr(forbid(unsafe_code))))] #![doc(test(attr(deny( missing_copy_implementations, diff --git a/serde_with_macros/src/lib.rs b/serde_with_macros/src/lib.rs index 24fa3e78..06558605 100644 --- a/serde_with_macros/src/lib.rs +++ b/serde_with_macros/src/lib.rs @@ -1,9 +1,11 @@ #![forbid(unsafe_code)] -#![deny( +#![warn( + clippy::semicolon_if_nothing_returned, missing_copy_implementations, // missing_crate_level_docs, not available in MSRV missing_debug_implementations, missing_docs, + rust_2018_idioms, trivial_casts, trivial_numeric_casts, unused_extern_crates, @@ -11,7 +13,6 @@ unused_qualifications, variant_size_differences )] -#![warn(rust_2018_idioms)] #![doc(test(attr(forbid(unsafe_code))))] #![doc(test(attr(deny( missing_copy_implementations,