Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor lints #1386

Merged
merged 3 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions crates/interpreter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ readme = "../../README.md"
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints.rust]
unreachable_pub = "warn"
unused_must_use = "deny"
rust_2018_idioms = "deny"

[lints.rustdoc]
all = "warn"

[dependencies]
revm-primitives = { path = "../primitives", version = "3.1.1", default-features = false }

Expand Down
4 changes: 1 addition & 3 deletions crates/interpreter/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
//! # revm-interpreter
//!
//! REVM Interpreter.
#![warn(rustdoc::all)]
#![warn(unreachable_pub, unused_crate_dependencies)]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(not(feature = "std"))]
Expand Down
8 changes: 8 additions & 0 deletions crates/precompile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ version = "6.0.0"
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints.rust]
unreachable_pub = "warn"
unused_must_use = "deny"
rust_2018_idioms = "deny"

[lints.rustdoc]
all = "warn"

[dependencies]
revm-primitives = { path = "../primitives", version = "3.1.1", default-features = false }
bn = { package = "substrate-bn", version = "0.6", default-features = false }
Expand Down
2 changes: 0 additions & 2 deletions crates/precompile/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
//! # revm-precompile
//!
//! Implementations of EVM precompiled contracts.
#![warn(rustdoc::all)]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(not(feature = "std"), no_std)]

#[macro_use]
Expand Down
11 changes: 8 additions & 3 deletions crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ repository = "https://github.com/bluealloy/revm"
version = "3.1.1"
readme = "../../README.md"

# Don't need to run build script outside of this repo
exclude = ["build.rs", "src/kzg/*.txt"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints.rust]
unreachable_pub = "warn"
unused_must_use = "deny"
rust_2018_idioms = "deny"

[lints.rustdoc]
all = "warn"

[dependencies]
alloy-primitives = { version = "0.7.2", default-features = false, features = [
"rlp",
Expand Down
4 changes: 1 addition & 3 deletions crates/primitives/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
//! # revm-primitives
//!
//! EVM primitive types.
#![warn(rustdoc::all)]
#![warn(unreachable_pub, unused_crate_dependencies)]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(not(feature = "std"))]
Expand Down
18 changes: 15 additions & 3 deletions crates/revm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ readme = "../../README.md"
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints.rust]
unreachable_pub = "warn"
unused_must_use = "deny"
rust_2018_idioms = "deny"

[lints.rustdoc]
all = "warn"

[dependencies]
# revm
revm-interpreter = { path = "../interpreter", version = "4.0.0", default-features = false }
Expand Down Expand Up @@ -46,16 +54,20 @@ alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy.git", rev = "44b8a6
alloy-transport = { git = "https://github.com/alloy-rs/alloy.git", rev = "44b8a6d", optional = true, default-features = false }

[dev-dependencies]
alloy-sol-types = { version = "0.7.0", default-features = false, features = ["std"] }
alloy-sol-types = { version = "0.7.0", default-features = false, features = [
"std",
] }
ethers-contract = { version = "2.0.14", default-features = false }
anyhow = "1.0.82"
criterion = "0.5"
indicatif = "0.17"
reqwest = { version = "0.12" }

alloy-provider = { git = "https://github.com/alloy-rs/alloy.git", rev = "44b8a6d", default-features = false, features = ["reqwest"] }
alloy-provider = { git = "https://github.com/alloy-rs/alloy.git", rev = "44b8a6d", default-features = false, features = [
"reqwest",
] }
# needed for enabling TLS to use HTTPS connections when testing alloy DB
alloy-transport-http = { git = "https://github.com/alloy-rs/alloy.git" , rev = "44b8a6d" }
alloy-transport-http = { git = "https://github.com/alloy-rs/alloy.git", rev = "44b8a6d" }

[features]
default = ["std", "c-kzg", "secp256k1", "portable"]
Expand Down
2 changes: 1 addition & 1 deletion crates/revm/src/journaled_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::vec::Vec;
pub struct JournaledState {
/// Current state.
pub state: State,
/// [EIP-1153[(https://eips.ethereum.org/EIPS/eip-1153) transient storage that is discarded after every transactions
/// [EIP-1153](https://eips.ethereum.org/EIPS/eip-1153) transient storage that is discarded after every transactions
pub transient_storage: TransientStorage,
/// logs
pub logs: Vec<Log>,
Expand Down
5 changes: 1 addition & 4 deletions crates/revm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#![doc = "Revm is a Rust EVM implementation."]
#![warn(rustdoc::all, unreachable_pub)]
#![allow(rustdoc::bare_urls)]
//! Revm is a Rust EVM implementation.
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(not(feature = "std"), no_std)]

#[macro_use]
Expand Down
Loading