ForgeLSForgeLS

Lint rules

The 22 correctness rule IDs, levels, and severities

Every diagnostic ForgeLS produces carries a stable rule ID. IDs have the form correctness/<name>. Rules report at Error severity unless set otherwise in Configuration under [lint.rules] with off, warn, or err.

Rules

Rule IDWhat it checks
correctness/parse-errorSyntax errors with span and message
correctness/call-arityPlain and member call argument counts, including getters
correctness/struct-arityStruct constructor argument counts
correctness/error-arityrevert Name(args) argument counts
correctness/deploy-aritynew C(args) constructor argument counts
correctness/emit-arityemit Event(args) argument counts
correctness/builtin-arityGlobal function arity (keccak256, ecrecover, addmod, and rest)
correctness/call-optionsUnknown call options; salt only allowed on new
correctness/unresolved-identifierUnknown identifiers
correctness/unresolved-importImports that resolve to nothing
correctness/unresolved-eventUnknown event names in emit
correctness/visibilityExternal/private/internal call violations
correctness/mutabilityState reads in pure, writes in pure and view
correctness/payable-valuevalue option on non-payable targets
correctness/type-mismatchLiteral and builtin-shape assignments against the declared type
correctness/shadowingInner params and locals shadowing outer declarations
correctness/unusedUnused params, locals, and named imports
correctness/data-locationMissing or forbidden memory, storage, calldata
correctness/overrideMissing, dangling, or non-virtual override on functions
correctness/interface-rulesState variables and constructors in interfaces
correctness/indexed-limitMore than 3 indexed params on non-anonymous events
correctness/inconsistent-inheritanceHierarchies that fail C3 linearization (falls back to DFS)

Severity

LevelEffect
errReports at Error severity. Blocks fls check with exit code 1.
warnReports at Warning severity. fls check still exits 0.
offThe runner drops the diagnostic.

Shadowing, unused variables, and data location reports are Error in V1. The Solidity compiler treats some of these as warnings; the stricter V1 behavior is intentional and documented per rule in the source analysis modules.

On this page