macro_rules! declare_forge_lint {
($id:ident, $severity:expr, $str_id:expr, $desc:expr) => { ... };
}Expand description
Macro for defining lints and relevant metadata for the Solidity linter.
§Parameters
Each lint requires the following input fields:
$id: Identifier of the generatedSolLintconstant.$severity: TheSeverityof the lint (e.g.High,Med,Low,Info,Gas).$str_id: A unique identifier used to reference a specific lint during configuration.$desc: A short description of the lint.
§Note
Each lint must have a corresponding markdown documentation file at
crates/lint/docs/<str_id>.md. The help URL is auto-generated by the macro and points to
the per-lint page on the Foundry docs site (getfoundry.sh/forge/linting/<str_id>). To
ensure that new lint rules have their corresponding docs, the existence of every registered
lint’s markdown file is validated by a unit test (see crates/lint/src/sol/mod.rs).