Skip to content
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
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion crates/lint/src/sol/gas/keccak.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use super::AsmKeccak256;
use crate::{
declare_forge_lint,
linter::EarlyLintPass,
sol::{Severity, SolLint},
};
Expand Down
5 changes: 1 addition & 4 deletions crates/lint/src/sol/gas/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use crate::{
register_lints,
sol::{EarlyLintPass, SolLint},
};
use crate::sol::{EarlyLintPass, SolLint};

mod keccak;
use keccak::ASM_KECCAK256;
Expand Down
1 change: 0 additions & 1 deletion crates/lint/src/sol/high/incorrect_shift.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use super::IncorrectShift;
use crate::{
declare_forge_lint,
linter::{EarlyLintPass, LintContext},
sol::{Severity, SolLint},
};
Expand Down
5 changes: 1 addition & 4 deletions crates/lint/src/sol/high/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use crate::{
register_lints,
sol::{EarlyLintPass, SolLint},
};
use crate::sol::{EarlyLintPass, SolLint};

mod incorrect_shift;
use incorrect_shift::INCORRECT_SHIFT;
Expand Down
1 change: 0 additions & 1 deletion crates/lint/src/sol/info/mixed_case.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use super::{MixedCaseFunction, MixedCaseVariable};
use crate::{
declare_forge_lint,
linter::{EarlyLintPass, LintContext},
sol::{Severity, SolLint},
};
Expand Down
5 changes: 1 addition & 4 deletions crates/lint/src/sol/info/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use crate::{
register_lints,
sol::{EarlyLintPass, SolLint},
};
use crate::sol::{EarlyLintPass, SolLint};

mod mixed_case;
use mixed_case::{MIXED_CASE_FUNCTION, MIXED_CASE_VARIABLE};
Expand Down
1 change: 0 additions & 1 deletion crates/lint/src/sol/info/pascal_case.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use super::PascalCaseStruct;
use crate::{
declare_forge_lint,
linter::{EarlyLintPass, LintContext},
sol::{Severity, SolLint},
};
Expand Down
1 change: 0 additions & 1 deletion crates/lint/src/sol/info/screaming_snake_case.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use super::ScreamingSnakeCase;
use crate::{
declare_forge_lint,
linter::{EarlyLintPass, LintContext},
sol::{Severity, SolLint},
};
Expand Down
9 changes: 8 additions & 1 deletion crates/lint/src/sol/macros.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#[macro_export]
macro_rules! link {
($url:expr) => {
concat!("\x1b]8;;", $url, "\x1b\\", $url, "\x1b]8;;\x1b\\")
};
}

/// Macro for defining lints and relevant metadata for the Solidity linter.
///
/// # Parameters
Expand All @@ -20,7 +27,7 @@ macro_rules! declare_forge_lint {
id: $str_id,
severity: $severity,
description: $desc,
help: concat!("https://book.getfoundry.sh/reference/forge/forge-lint#", $str_id),
help: link!(concat!("https://book.getfoundry.sh/reference/forge/forge-lint#", $str_id)),
};
};

Expand Down
1 change: 0 additions & 1 deletion crates/lint/src/sol/med/div_mul.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use super::DivideBeforeMultiply;
use crate::{
declare_forge_lint,
linter::{EarlyLintPass, LintContext},
sol::{Severity, SolLint},
};
Expand Down
5 changes: 1 addition & 4 deletions crates/lint/src/sol/med/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use crate::{
register_lints,
sol::{EarlyLintPass, SolLint},
};
use crate::sol::{EarlyLintPass, SolLint};

mod div_mul;
use div_mul::DIVIDE_BEFORE_MULTIPLY;
Expand Down
1 change: 1 addition & 0 deletions crates/lint/src/sol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use std::{
};
use thiserror::Error;

#[macro_use]
pub mod macros;

pub mod gas;
Expand Down