lints: move top-level lints to [workspace.lints] manifest table (#5935)

This commit is contained in:
Thomas Coratger
2024-01-04 14:38:02 +01:00
committed by GitHub
parent 17b75dd403
commit 9aa44093cf
128 changed files with 211 additions and 145 deletions

View File

@ -7,6 +7,9 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true
[lints]
workspace = true
[dependencies]
codecs-derive = { path = "./derive", default-features = false }
@ -33,4 +36,4 @@ compact = ["codecs-derive/compact"]
scale = ["codecs-derive/scale"]
postcard = ["codecs-derive/postcard"]
no_codec = ["codecs-derive/no_codec"]
optimism = ["codecs-derive/optimism"]
optimism = ["codecs-derive/optimism"]

View File

@ -8,6 +8,9 @@ homepage.workspace = true
repository.workspace = true
readme = "../README.md"
[lints]
workspace = true
[package.metadata.cargo-udeps.ignore]
normal = [
# Used in proc macros

View File

@ -5,7 +5,7 @@
html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
)]
#![deny(unused_must_use, rust_2018_idioms)]
#![allow(unreachable_pub, missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use proc_macro::{self, TokenStream, TokenTree};
@ -30,14 +30,14 @@ pub fn derive_zstd(input: TokenStream) -> TokenStream {
/// This code implements the main codec. If the codec supports it, it will also provide the [derive_arbitrary()] function, which automatically implements arbitrary traits and roundtrip fuzz tests.
///
/// If you prefer to manually implement the arbitrary traits, you can still use the [add_arbitrary_tests()] function to add arbitrary fuzz tests.
///
///
/// Example usage:
/// * `#[main_codec(rlp)]`: will implement `derive_arbitrary(rlp)` or `derive_arbitrary(compact, rlp)`, if `compact` is the `main_codec`.
/// * `#[main_codec(no_arbitrary)]`: will skip `derive_arbitrary` (both trait implementations and tests)
#[proc_macro_attribute]
#[rustfmt::skip]
#[allow(unreachable_code)]
pub fn main_codec(args: TokenStream, input: TokenStream) -> TokenStream {
pub fn main_codec(args: TokenStream, input: TokenStream) -> TokenStream {
#[cfg(feature = "compact")]
return use_compact(args, input);

View File

@ -5,14 +5,7 @@
html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
)]
#![warn(
missing_debug_implementations,
missing_docs,
unused_crate_dependencies,
unreachable_pub,
rustdoc::all
)]
#![deny(unused_must_use, rust_2018_idioms)]
#![warn(unused_crate_dependencies)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(feature = "std"), no_std)]