Add lint for missing await
when returning a value inside a try
/ catch
block
#58510
Labels
analyzer-linter
Issues with the analyzer's support for the linter package
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
linter-lint-request
type-enhancement
A request for a change that isn't a bug
Describe the rule you'd like to see implemented
I'd love to have a lint that detects missing
await
keyword afterreturn
intry
/on
/catch
blocks ofasync
functions.Without the
await
keyword in thetry
block, theon
/catch
block is ineffective.Examples
Additional context
This problem caused the customer-affecting bug in
flutterfire
/cloud_functions
(firebase/flutterfire#2069).It also broke my team's app yesterday.
The text was updated successfully, but these errors were encountered: