Skip to main content

declare_forge_lint

Macro declare_forge_lint 

Source
macro_rules! declare_forge_lint {
    ($id:ident, $severity:expr, $str_id:expr, $desc:expr) => { ... };
}
Expand description

Declares the static metadata of a lint.

  • $id: identifier of the generated SolLint constant.
  • $severity: the Severity of the lint.
  • $str_id: the user-facing lint id used in configuration and diagnostics.
  • $desc: a short description.

Each lint must have a markdown page at crates/lint/docs/<str_id>.md; the help URL is derived from $str_id and validated by a unit test in crates/lint/src/sol/mod.rs.