Enable unnecessary_await_in_return lint (#77434)

This commit is contained in:
Michael Goderbauer
2021-03-05 18:38:15 -08:00
committed by GitHub
parent 8a9042ba91
commit cb867bbedc
91 changed files with 183 additions and 183 deletions

View File

@@ -65,7 +65,7 @@ class ApplicationPackageFactory {
case TargetPlatform.android_x64:
case TargetPlatform.android_x86:
if (applicationBinary == null) {
return await AndroidApk.fromAndroidProject(
return AndroidApk.fromAndroidProject(
FlutterProject.current().android,
processManager: _processManager,
processUtils: _processUtils,

View File

@@ -148,7 +148,7 @@ class AppContext {
Map<Type, Generator>.unmodifiable(overrides ?? const <Type, Generator>{}),
Map<Type, Generator>.unmodifiable(fallbacks ?? const <Type, Generator>{}),
);
return await runZoned<Future<V>>(
return runZoned<Future<V>>(
() async => await body(),
zoneValues: <_Key, AppContext>{_Key.key: child},
zoneSpecification: zoneSpecification,

View File

@@ -95,5 +95,5 @@ class DartDevelopmentService {
}
}
Future<void> shutdown() async => await _ddsInstance?.shutdown();
Future<void> shutdown() async => _ddsInstance?.shutdown();
}

View File

@@ -543,7 +543,7 @@ class _DefaultProcessUtils implements ProcessUtils {
unawaited(stdoutSubscription.cancel());
unawaited(stderrSubscription.cancel());
return await process.exitCode;
return process.exitCode;
}
@override

View File

@@ -74,7 +74,7 @@ Future<T> runInContext<T>(
return runner();
}
return await context.run<T>(
return context.run<T>(
name: 'global fallbacks',
body: runnerWrapper,
overrides: overrides,

View File

@@ -661,7 +661,7 @@ class FuchsiaDevice extends Device {
throwToolExit('Cannot interact with device. No ssh config.\n'
'Try setting FUCHSIA_SSH_CONFIG or FUCHSIA_BUILD_DIR.');
}
return await globals.processUtils.run(<String>[
return globals.processUtils.run(<String>[
'ssh',
'-F',
globals.fuchsiaArtifacts.sshConfig.absolute.path,
@@ -676,7 +676,7 @@ class FuchsiaDevice extends Device {
throwToolExit('Cannot interact with device. No ssh config.\n'
'Try setting FUCHSIA_SSH_CONFIG or FUCHSIA_BUILD_DIR.');
}
return await globals.processUtils.run(<String>[
return globals.processUtils.run(<String>[
'scp',
'-F',
globals.fuchsiaArtifacts.sshConfig.absolute.path,

View File

@@ -245,7 +245,7 @@ class FuchsiaPackageServer {
if (_process == null) {
return false;
}
return await fuchsiaSdk.fuchsiaPM.publish(_repo, package.path);
return fuchsiaSdk.fuchsiaPM.publish(_repo, package.path);
}
@override

View File

@@ -119,7 +119,7 @@ class IOSDevices extends PollingDeviceDiscovery {
);
}
return await _xcdevice.getAvailableIOSDevices(timeout: timeout);
return _xcdevice.getAvailableIOSDevices(timeout: timeout);
}
@override
@@ -130,7 +130,7 @@ class IOSDevices extends PollingDeviceDiscovery {
];
}
return await _xcdevice.getDiagnostics();
return _xcdevice.getDiagnostics();
}
}

View File

@@ -162,7 +162,7 @@ class MDnsObservatoryDiscovery {
final String host = usesIpv6
? InternetAddress.loopbackIPv6.address
: InternetAddress.loopbackIPv4.address;
return await buildObservatoryUri(
return buildObservatoryUri(
device,
host,
result.port,

View File

@@ -102,7 +102,7 @@ ${_projectMetadataInformation()}
'&body=${Uri.encodeQueryComponent(body)}'
'&labels=${Uri.encodeQueryComponent('tool,severe: crash')}';
return await _shortURL(fullURL);
return _shortURL(fullURL);
}
/// Provide information about the Flutter project in the working directory, if present.

View File

@@ -1183,7 +1183,7 @@ abstract class FlutterCommand extends Command<void> {
Usage.command(commandPath, parameters: additionalUsageValues);
}
return await runCommand();
return runCommand();
}
Future<void> _sendNullSafetyAnalyticsEvents(FlutterProject project) async {