The {“extends”: “solhint:recommended”} property in a configuration file enables this rule.
Code block has zero statements inside. Some common exceptions apply.
This rule accepts a string option of rule severity. Must be one of “error”, “warn”, “off”. Default to warn.
{
"rules": {
"no-empty-blocks": "warn"
}
}
receive () external {}
fallback () external {}
constructor(uint param) Foo(param) Bar(param*2) {}
if(condition) {}
contract Foo {}
constructor () {}
This rule was introduced in Solhint 1.1.5