| warning | This is a dynamically generated file. Do not edit manually. |
|---|---|
| layout | default |
| title | no-empty-blocks | Solhint |
The {"extends": "solhint:recommended"} property in a configuration file enables this rule.
Code block has zero statements inside. Exceptions apply.
This rule accepts a string option for rule severity. Must be one of "error", "warn", "off". Defaults to warn.
{
"rules": {
"no-empty-blocks": "warn"
}
}- The rule ignores an empty constructor by default as long as base contracts are being inherited. See "Empty Constructor" example.
fallback () external { }constructor(uint param) Foo(param) Bar(param*2) { }if (condition) { }contract Foo { }constructor () { }This rule was introduced in Solhint 5.0.4