zulip-flutter icon indicating copy to clipboard operation
zulip-flutter copied to clipboard

Lint on unawaited futures

Open gnprice opened this issue 8 months ago • 2 comments

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.

gnprice avatar Jun 12 '24 20:06 gnprice