Solhint

Solhint

Community Analyzer

Code block has zero statements inside. Exceptions apply SOLHINT-W1008

Anti-pattern
Minor

Code block has zero statements inside. Exceptions apply.

Bad Practice

  1. Empty block on if statement
if (condition) { }
  1. Empty contract
contract Foo { }
  1. Empty block in constructor without parent initialization
constructor () { }

Recommended

  1. Empty fallback function
fallback () external { }
  1. Empty constructor with member initialization list
constructor(uint param) Foo(param) Bar(param*2) { }

Learn more

no-empty-blocks on Solhint's documentation.