avoid_empty_blocks

SeverityQuick FixOptions
Warning

Details

DO avoid empty blocks as they are usually a sign of missing implementation.

Bad
void doSomething() {}
Good
void doSomething() {
  actuallyDoSomething();
}

void doSomething() {
  // TODO: implement doSomething
}

Usage

To enable the avoid_empty_blocks rule, add avoid_empty_blocks under custom_lint > rules in your analysis_options.yaml file:

custom_lint:
  rules:
    - avoid_empty_blocks