mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-25 07:07:57 +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
|
||||
|
||||
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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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<D>
|
||||
where
|
||||
D: Dependency + Clone,
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
//! Solidity to PolkaVM compiler constants.
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
/// The default executable name.
|
||||
pub static DEFAULT_EXECUTABLE_NAME: &str = "resolc";
|
||||
|
||||
|
||||
@@ -179,7 +179,6 @@ pub fn standard_output<T: Compiler>(
|
||||
}
|
||||
|
||||
/// Runs the standard JSON mode.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn standard_json<T: Compiler>(
|
||||
solc: &mut T,
|
||||
detect_missing_libraries: bool,
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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")]
|
||||
|
||||
@@ -42,7 +42,6 @@ impl Lexer {
|
||||
}
|
||||
|
||||
/// Advances the lexer, returning the next lexeme.
|
||||
#[allow(clippy::should_implement_trait)]
|
||||
pub fn next(&mut self) -> Result<Token, Error> {
|
||||
if let Some(peeked) = self.peeked.take() {
|
||||
return Ok(peeked);
|
||||
|
||||
Reference in New Issue
Block a user