Skip to content

Quick Fix: Add Curly Braces Everywhere, does not do for chained if/else #60600

Open
@scheglov

Description

@scheglov
void foo(bool x, bool y) {
  if (x)
    print(0);
  else if (y)
    print(1);
  else
    print(2);
}

Apply at print(0), only if (x) is fixed.

void foo(bool x, bool y) {
  if (x) {
    print(0);
  } else if (y)
    print(1);
  else
    print(2);
}

Cannot be applied at print(1) initially or after the first fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-quick-fixIssues with analysis server (quick) fixesdevexp-serverIssues related to some aspect of the analysis servertype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions