Skip to content

Lint to use curly bodies for statements except one-line ifs (Style Guide). #57151

@pq

Description

@pq

Migrated from dartbug.com/22001:

Should warn or fix if a for, while, or else clause does not have a curly brace body. It should also flag the then clause of an if if it doesn't fit on a single line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    devexp-linterIssues with the analyzer's support for the linter packagegood first issueA good starting issue for contributors (issues with this label will appear in /contribute)legacy-area-analyzerUse area-devexp instead.type-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