mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-11 17:21:01 +00:00
remove superfluous warning and clippy allows (#194)
Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -42,7 +42,7 @@ format:
|
|||||||
cargo fmt --all --check
|
cargo fmt --all --check
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
cargo clippy --all-features --workspace --tests --benches -- --deny warnings --allow dead_code
|
cargo clippy --all-features --workspace --tests --benches -- --deny warnings
|
||||||
|
|
||||||
machete:
|
machete:
|
||||||
cargo install cargo-machete
|
cargo install cargo-machete
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
//! The debug IR type.
|
//! The debug IR type.
|
||||||
|
|
||||||
/// The debug IR type.
|
/// The debug IR type.
|
||||||
#[allow(non_camel_case_types)]
|
|
||||||
#[allow(clippy::upper_case_acronyms)]
|
#[allow(clippy::upper_case_acronyms)]
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
pub enum IRType {
|
pub enum IRType {
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ pub fn build_assembly_text(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Implemented by items which are translated into LLVM IR.
|
/// Implemented by items which are translated into LLVM IR.
|
||||||
#[allow(clippy::upper_case_acronyms)]
|
|
||||||
pub trait WriteLLVM<D>
|
pub trait WriteLLVM<D>
|
||||||
where
|
where
|
||||||
D: Dependency + Clone,
|
D: Dependency + Clone,
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
//! Solidity to PolkaVM compiler constants.
|
//! Solidity to PolkaVM compiler constants.
|
||||||
|
|
||||||
#![allow(dead_code)]
|
|
||||||
|
|
||||||
/// The default executable name.
|
/// The default executable name.
|
||||||
pub static DEFAULT_EXECUTABLE_NAME: &str = "resolc";
|
pub static DEFAULT_EXECUTABLE_NAME: &str = "resolc";
|
||||||
|
|
||||||
|
|||||||
@@ -179,7 +179,6 @@ pub fn standard_output<T: Compiler>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Runs the standard JSON mode.
|
/// Runs the standard JSON mode.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub fn standard_json<T: Compiler>(
|
pub fn standard_json<T: Compiler>(
|
||||||
solc: &mut T,
|
solc: &mut T,
|
||||||
detect_missing_libraries: bool,
|
detect_missing_libraries: bool,
|
||||||
|
|||||||
@@ -15,9 +15,7 @@ use self::yul::Yul;
|
|||||||
|
|
||||||
/// The contract source code.
|
/// The contract source code.
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
#[allow(non_camel_case_types)]
|
|
||||||
#[allow(clippy::upper_case_acronyms)]
|
#[allow(clippy::upper_case_acronyms)]
|
||||||
#[allow(clippy::enum_variant_names)]
|
|
||||||
pub enum IR {
|
pub enum IR {
|
||||||
/// The Yul source code.
|
/// The Yul source code.
|
||||||
Yul(Yul),
|
Yul(Yul),
|
||||||
|
|||||||
@@ -166,7 +166,6 @@ pub struct Arguments {
|
|||||||
|
|
||||||
impl Arguments {
|
impl Arguments {
|
||||||
/// Validates the arguments.
|
/// Validates the arguments.
|
||||||
#[allow(clippy::collapsible_if)]
|
|
||||||
pub fn validate(&self) -> anyhow::Result<()> {
|
pub fn validate(&self) -> anyhow::Result<()> {
|
||||||
if self.version && std::env::args().count() > 2 {
|
if self.version && std::env::args().count() > 2 {
|
||||||
anyhow::bail!("No other options are allowed while getting the compiler version.");
|
anyhow::bail!("No other options are allowed while getting the compiler version.");
|
||||||
@@ -236,18 +235,14 @@ impl Arguments {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.llvm_ir {
|
if self.llvm_ir && self.solc.is_some() {
|
||||||
if self.solc.is_some() {
|
anyhow::bail!("`solc` is not used in LLVM IR and PolkaVM assembly modes.");
|
||||||
anyhow::bail!("`solc` is not used in LLVM IR and PolkaVM assembly modes.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.combined_json.is_some() {
|
if self.combined_json.is_some() && (self.output_assembly || self.output_binary) {
|
||||||
if self.output_assembly || self.output_binary {
|
anyhow::bail!(
|
||||||
anyhow::bail!(
|
"Cannot output assembly or binary outside of JSON in combined JSON mode."
|
||||||
"Cannot output assembly or binary outside of JSON in combined JSON mode."
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.standard_json {
|
if self.standard_json {
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ use serde::Serialize;
|
|||||||
|
|
||||||
/// The `solc --standard-json` expected output selection flag.
|
/// The `solc --standard-json` expected output selection flag.
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
#[allow(non_camel_case_types)]
|
|
||||||
#[allow(clippy::upper_case_acronyms)]
|
|
||||||
pub enum Flag {
|
pub enum Flag {
|
||||||
/// The ABI JSON.
|
/// The ABI JSON.
|
||||||
#[serde(rename = "abi")]
|
#[serde(rename = "abi")]
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ impl Lexer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Advances the lexer, returning the next lexeme.
|
/// Advances the lexer, returning the next lexeme.
|
||||||
#[allow(clippy::should_implement_trait)]
|
|
||||||
pub fn next(&mut self) -> Result<Token, Error> {
|
pub fn next(&mut self) -> Result<Token, Error> {
|
||||||
if let Some(peeked) = self.peeked.take() {
|
if let Some(peeked) = self.peeked.take() {
|
||||||
return Ok(peeked);
|
return Ok(peeked);
|
||||||
|
|||||||
Reference in New Issue
Block a user