Skip to content

Lint on unawaited futures #731

Open
Open
@gnprice

Description

@gnprice

There's a pair of lint rules in the Dart analyzer that detect when we have a Future and neglect to await it:
https://dart.dev/tools/linter-rules/unawaited_futures
https://dart.dev/tools/linter-rules/discarded_futures

(Despite the name, unawaited_futures doesn't cover one major class of unawaited futures: those where the enclosing function isn't even async. Those are covered by discarded_futures.)

It'd be good to enable those. The bugs they catch can be pretty subtle otherwise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-toolsOur own development tooling, scripts, and infrastructureupstreamWould benefit from work in Flutter or another upstream

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions