diff --git a/Makefile b/Makefile index e8ecabde..579fc654 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ format: cargo fmt --all --check clippy: - cargo clippy --all-features --workspace --tests --benches -- --deny warnings --allow dead_code + cargo clippy --all-features --workspace --tests --benches -- --deny warnings machete: cargo install cargo-machete diff --git a/crates/llvm-context/src/debug_config/ir_type.rs b/crates/llvm-context/src/debug_config/ir_type.rs index 86c60f91..195fc956 100644 --- a/crates/llvm-context/src/debug_config/ir_type.rs +++ b/crates/llvm-context/src/debug_config/ir_type.rs @@ -1,7 +1,6 @@ //! The debug IR type. /// The debug IR type. -#[allow(non_camel_case_types)] #[allow(clippy::upper_case_acronyms)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum IRType { diff --git a/crates/llvm-context/src/polkavm/mod.rs b/crates/llvm-context/src/polkavm/mod.rs index f1d7037c..f60857df 100644 --- a/crates/llvm-context/src/polkavm/mod.rs +++ b/crates/llvm-context/src/polkavm/mod.rs @@ -59,7 +59,6 @@ pub fn build_assembly_text( } /// Implemented by items which are translated into LLVM IR. -#[allow(clippy::upper_case_acronyms)] pub trait WriteLLVM where D: Dependency + Clone, diff --git a/crates/solidity/src/const.rs b/crates/solidity/src/const.rs index bec342d1..519584a9 100644 --- a/crates/solidity/src/const.rs +++ b/crates/solidity/src/const.rs @@ -1,7 +1,5 @@ //! Solidity to PolkaVM compiler constants. -#![allow(dead_code)] - /// The default executable name. pub static DEFAULT_EXECUTABLE_NAME: &str = "resolc"; diff --git a/crates/solidity/src/lib.rs b/crates/solidity/src/lib.rs index 12eeca6f..7214120e 100644 --- a/crates/solidity/src/lib.rs +++ b/crates/solidity/src/lib.rs @@ -179,7 +179,6 @@ pub fn standard_output( } /// Runs the standard JSON mode. -#[allow(clippy::too_many_arguments)] pub fn standard_json( solc: &mut T, detect_missing_libraries: bool, diff --git a/crates/solidity/src/project/contract/ir/mod.rs b/crates/solidity/src/project/contract/ir/mod.rs index a5843904..70f349d0 100644 --- a/crates/solidity/src/project/contract/ir/mod.rs +++ b/crates/solidity/src/project/contract/ir/mod.rs @@ -15,9 +15,7 @@ use self::yul::Yul; /// The contract source code. #[derive(Debug, Serialize, Deserialize, Clone)] -#[allow(non_camel_case_types)] #[allow(clippy::upper_case_acronyms)] -#[allow(clippy::enum_variant_names)] pub enum IR { /// The Yul source code. Yul(Yul), diff --git a/crates/solidity/src/resolc/arguments.rs b/crates/solidity/src/resolc/arguments.rs index 3d12b646..e0e9e923 100644 --- a/crates/solidity/src/resolc/arguments.rs +++ b/crates/solidity/src/resolc/arguments.rs @@ -166,7 +166,6 @@ pub struct Arguments { impl Arguments { /// Validates the arguments. - #[allow(clippy::collapsible_if)] pub fn validate(&self) -> anyhow::Result<()> { if self.version && std::env::args().count() > 2 { anyhow::bail!("No other options are allowed while getting the compiler version."); @@ -236,18 +235,14 @@ impl Arguments { } } - if self.llvm_ir { - if self.solc.is_some() { - anyhow::bail!("`solc` is not used in LLVM IR and PolkaVM assembly modes."); - } + if self.llvm_ir && self.solc.is_some() { + anyhow::bail!("`solc` is not used in LLVM IR and PolkaVM assembly modes."); } - if self.combined_json.is_some() { - if self.output_assembly || self.output_binary { - anyhow::bail!( - "Cannot output assembly or binary outside of JSON in combined JSON mode." - ); - } + if self.combined_json.is_some() && (self.output_assembly || self.output_binary) { + anyhow::bail!( + "Cannot output assembly or binary outside of JSON in combined JSON mode." + ); } if self.standard_json { diff --git a/crates/solidity/src/solc/standard_json/input/settings/selection/file/flag.rs b/crates/solidity/src/solc/standard_json/input/settings/selection/file/flag.rs index bfcb698b..c80e85e1 100644 --- a/crates/solidity/src/solc/standard_json/input/settings/selection/file/flag.rs +++ b/crates/solidity/src/solc/standard_json/input/settings/selection/file/flag.rs @@ -5,8 +5,6 @@ use serde::Serialize; /// The `solc --standard-json` expected output selection flag. #[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Hash)] -#[allow(non_camel_case_types)] -#[allow(clippy::upper_case_acronyms)] pub enum Flag { /// The ABI JSON. #[serde(rename = "abi")] diff --git a/crates/solidity/src/yul/lexer/mod.rs b/crates/solidity/src/yul/lexer/mod.rs index ca26e8f9..1ae2bea3 100644 --- a/crates/solidity/src/yul/lexer/mod.rs +++ b/crates/solidity/src/yul/lexer/mod.rs @@ -42,7 +42,6 @@ impl Lexer { } /// Advances the lexer, returning the next lexeme. - #[allow(clippy::should_implement_trait)] pub fn next(&mut self) -> Result { if let Some(peeked) = self.peeked.take() { return Ok(peeked);