Enable unnecessary_await_in_return lint (#77434)
This commit is contained in:
committed by
GitHub
parent
8a9042ba91
commit
cb867bbedc
@@ -1203,7 +1203,7 @@ Future<EvalResult> _evalCommand(String executable, List<String> arguments, {
|
||||
Future<void> _runFlutterAnalyze(String workingDirectory, {
|
||||
List<String> options = const <String>[],
|
||||
}) async {
|
||||
return await runCommand(
|
||||
return runCommand(
|
||||
flutter,
|
||||
<String>['analyze', '--dartdocs', ...options],
|
||||
workingDirectory: workingDirectory,
|
||||
@@ -1214,7 +1214,7 @@ final RegExp _importPattern = RegExp(r'''^\s*import (['"])package:flutter/([^.]+
|
||||
final RegExp _importMetaPattern = RegExp(r'''^\s*import (['"])package:meta/meta\.dart\1''');
|
||||
|
||||
Future<Set<String>> _findFlutterDependencies(String srcPath, List<String> errors, { bool checkForMeta = false }) async {
|
||||
return await _allFiles(srcPath, 'dart', minimumMatches: 1)
|
||||
return _allFiles(srcPath, 'dart', minimumMatches: 1)
|
||||
.map<Set<String>>((File file) {
|
||||
final Set<String> result = <String>{};
|
||||
for (final String line in file.readAsLinesSync()) {
|
||||
|
||||
@@ -669,7 +669,7 @@ class ArchivePublisher {
|
||||
if (dest.endsWith('.json')) {
|
||||
mimeType = 'application/json';
|
||||
}
|
||||
return await _runGsUtil(<String>[
|
||||
return _runGsUtil(<String>[
|
||||
// Use our preferred MIME type for the files we care about
|
||||
// and let gsutil figure it out for anything else.
|
||||
if (mimeType != null) ...<String>['-h', 'Content-Type:$mimeType'],
|
||||
|
||||
@@ -377,7 +377,7 @@ void main() {
|
||||
'$gsutilCall -- stat $gsArchivePath': <ProcessResult>[ProcessResult(0, 0, '', '')],
|
||||
};
|
||||
processManager.fakeResults = calls;
|
||||
expect(() async => await publisher.publishArchive(false), throwsException);
|
||||
expect(() async => publisher.publishArchive(false), throwsException);
|
||||
processManager.verifyCalls(calls.keys.toList());
|
||||
});
|
||||
|
||||
|
||||
@@ -383,7 +383,7 @@ class ArchiveUnpublisher {
|
||||
if (mimeType != null) ...<String>['-h', 'Content-Type:$mimeType'],
|
||||
...<String>['cp', src, dest],
|
||||
];
|
||||
return await _runGsUtil(args, confirm: confirmed);
|
||||
return _runGsUtil(args, confirm: confirmed);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user