Enable unnecessary_await_in_return lint (#77434)
This commit is contained in:
committed by
GitHub
parent
8a9042ba91
commit
cb867bbedc
@@ -38,7 +38,7 @@ Future<String> getAndroidKeyCodes() async {
|
||||
|
||||
Future<String> getWindowsKeyCodes() async {
|
||||
final Uri keyCodesUri = Uri.parse('https://raw.githubusercontent.com/tpn/winsdk-10/master/Include/10.0.10240.0/um/WinUser.h');
|
||||
return await http.read(keyCodesUri);
|
||||
return http.read(keyCodesUri);
|
||||
}
|
||||
|
||||
/// Get contents of the file that contains the scan codes in Android source.
|
||||
@@ -54,12 +54,12 @@ Future<String> getAndroidScanCodes() async {
|
||||
|
||||
Future<String> getGlfwKeyCodes() async {
|
||||
final Uri keyCodesUri = Uri.parse('https://raw.githubusercontent.com/glfw/glfw/master/include/GLFW/glfw3.h');
|
||||
return await http.read(keyCodesUri);
|
||||
return http.read(keyCodesUri);
|
||||
}
|
||||
|
||||
Future<String> getGtkKeyCodes() async {
|
||||
final Uri keyCodesUri = Uri.parse('https://gitlab.gnome.org/GNOME/gtk/-/raw/master/gdk/gdkkeysyms.h');
|
||||
return await http.read(keyCodesUri);
|
||||
return http.read(keyCodesUri);
|
||||
}
|
||||
|
||||
Future<void> main(List<String> rawArguments) async {
|
||||
|
||||
@@ -69,7 +69,7 @@ void main() {
|
||||
test('throws exception if not run from macos', () async {
|
||||
createRunner(operatingSystem: 'linux');
|
||||
expect(
|
||||
() async => await runner.run(<String>['codesign']),
|
||||
() async => runner.run(<String>['codesign']),
|
||||
throwsExceptionWith('Error! Expected operating system "macos"'),
|
||||
);
|
||||
});
|
||||
@@ -77,7 +77,7 @@ void main() {
|
||||
test('throws exception if verify flag is not provided', () async {
|
||||
createRunner();
|
||||
expect(
|
||||
() async => await runner.run(<String>['codesign']),
|
||||
() async => runner.run(<String>['codesign']),
|
||||
throwsExceptionWith(
|
||||
'Sorry, but codesigning is not implemented yet. Please pass the --$kVerify flag to verify signatures'),
|
||||
);
|
||||
@@ -240,7 +240,7 @@ void main() {
|
||||
...codesignCheckCommands,
|
||||
]);
|
||||
expect(
|
||||
() async => await runner.run(<String>['codesign', '--$kVerify', '--$kRevision', revision]),
|
||||
() async => runner.run(<String>['codesign', '--$kVerify', '--$kRevision', revision]),
|
||||
throwsExceptionWith('Test failed because unsigned binaries detected.'),
|
||||
);
|
||||
expect(processManager.hasRemainingExpectations, false);
|
||||
@@ -325,7 +325,7 @@ void main() {
|
||||
...codesignCheckCommands,
|
||||
]);
|
||||
expect(
|
||||
() async => await runner.run(<String>['codesign', '--$kVerify', '--$kRevision', revision]),
|
||||
() async => runner.run(<String>['codesign', '--$kVerify', '--$kRevision', revision]),
|
||||
throwsExceptionWith('Test failed because files found with the wrong entitlements'),
|
||||
);
|
||||
expect(processManager.hasRemainingExpectations, false);
|
||||
|
||||
Reference in New Issue
Block a user