Open
Description
We already have this lint that warns you about unawaited futures if you marked your method async. I propose a broader version of this that looks that warns about unuawaited futures without caring about the async tag. It would only apply to tests because it is very rare for a developer to write test code calling async functions where they do not want to wait for the result:
test('tests something', () {
var myObj = new MyObj();
myObj.doSomething(); // It happens to be async
expect(myObj.someState, 'good');
});
This code looks perfectly fine and raises no linter alarms. What they meant to write is:
test('tests something', () async {
var myObj = new MyObj();
await myObj.doSomething();
expect(myObj.someState, 'good');
});