empty_statements

Group: errors

Maturity: stable

Linter v0.1.21

Since info is static, may be stale
recommendedflutter

View all Lint Rules

Using the Linter

AVOID empty statements.

Empty statements almost always indicate a bug.

For example,

BAD:

if (complicated.expression.foo());
  bar();

Formatted with dart format the bug becomes obvious:

if (complicated.expression.foo()) ;
bar();

Better to avoid the empty statement altogether.

GOOD:

if (complicated.expression.foo())
  bar();