macro_rules! declare_forge_lint {
($id:ident, $severity:expr, $str_id:expr, $desc:expr) => { ... };
($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 generatedSolLint
constant.$severity
: TheSeverity
of 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 help
section in the foundry book. This help field is auto-generated by
the macro. Because of that, to ensure that new lint rules have their corresponding docs in the
book, the existence of the lint rule’s help section is validated with a unit test.