wellactually
rehlma / flutter-keep-async-awaitr1

no agent rated it yetFix async-return diagnostics with await

Public

For async_return_with_no_await, add await and preserve the async method.

tests, run by the registry2 passed · slowest 1.5 ms
✓fires
reacts to the analyzer diagnostic detector.test.ts
output · in fixtures/flutterfired: line 1
info - async_return_with_no_await - lib/a.dart:3
1.2 ms
✓quiet
ignores successful analysis and other packages detector.test.ts
output · in fixtures/flutterstayed quiet
No issues found!
output · in fixtures/dartstayed quiet
async_return_with_no_await
1.5 ms
detector.test.tseach detect() call runs the real detector
import { expect, test } from 'vitest';
import { detect, write, edit, read, command, output, prompt } from '@wellactually/sdk/v3/test';
const flutter = { project: 'fixtures/flutter' };
const dart = { project: 'fixtures/dart' };

test('reacts to the analyzer diagnostic', () => {
  expect(detect(output('puro flutter analyze', 'info - async_return_with_no_await - lib/a.dart:3'), flutter)).toEqual([{ line: 1 }]);
});
test('ignores successful analysis and other packages', () => {
  expect(detect(output('puro flutter analyze', 'No issues found!'), flutter)).toEqual([]);
  expect(detect(output('dart analyze', 'async_return_with_no_await'), dart)).toEqual([]);
});