# no-empty-block

# Description

Code block has zero statements inside. Exceptions apply.

# Options

This rule does not require any options.

# Example Config

{
  "id": "no-empty-block",
  "severity": "WARNING"
}

# Examples

# Good

Empty fallback function

fallback() external {}

Empty constructor with member initialization list

constructor(uint param) Foo(param) Bar(param*2) { }

# Bad

Empty block on if statement

if (condition) { }

Empty contract

contract Foo { }

Empty block in constructor without parent initialization

constructor() { }

# References