enable lint avoid_void_async (#21652)
This commit is contained in:
parent
98ad574d9b
commit
774ca2f197
@ -74,7 +74,7 @@ linter:
|
||||
- avoid_types_as_parameter_names
|
||||
# - avoid_types_on_closure_parameters # conflicts with always_specify_types
|
||||
- avoid_unused_constructor_parameters
|
||||
# - avoid_void_async # not yet tested
|
||||
- avoid_void_async
|
||||
- await_only_futures
|
||||
- camel_case_types
|
||||
- cancel_subscriptions
|
||||
|
@ -6,7 +6,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/tasks/integration_tests.dart';
|
||||
|
||||
void main() async {
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.android;
|
||||
await task(createAndroidSemanticsIntegrationTest());
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ Future<void> runPluginProjectTest(Future<void> testFunction(FlutterPluginProject
|
||||
}
|
||||
}
|
||||
|
||||
void main() async {
|
||||
Future<void> main() async {
|
||||
await task(() async {
|
||||
section('Find Java');
|
||||
|
||||
|
@ -10,7 +10,7 @@ class InvalidOnInitLifecycleWidget extends StatefulWidget {
|
||||
|
||||
class InvalidOnInitLifecycleWidgetState extends State<InvalidOnInitLifecycleWidget> {
|
||||
@override
|
||||
void initState() async {
|
||||
Future<void> initState() async {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ class InvalidDidUpdateWidgetLifecycleWidget extends StatefulWidget {
|
||||
|
||||
class InvalidDidUpdateWidgetLifecycleWidgetState extends State<InvalidDidUpdateWidgetLifecycleWidget> {
|
||||
@override
|
||||
void didUpdateWidget(InvalidDidUpdateWidgetLifecycleWidget oldWidget) async {
|
||||
Future<void> didUpdateWidget(InvalidDidUpdateWidgetLifecycleWidget oldWidget) async {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
void main(FutureOr<void> testMain()) async {
|
||||
Future<void> main(FutureOr<void> testMain()) async {
|
||||
await runZoned<dynamic>(testMain, zoneValues: <Type, String>{
|
||||
String: '/test_config',
|
||||
});
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
void main(FutureOr<void> testMain()) async {
|
||||
Future<void> main(FutureOr<void> testMain()) async {
|
||||
await runZoned<dynamic>(testMain, zoneValues: <Type, dynamic>{
|
||||
String: '/test_config/nested_config',
|
||||
int: 123,
|
||||
|
@ -316,7 +316,7 @@ class ResidentCompiler {
|
||||
|
||||
final List<_CompilationRequest> _compilationQueue = <_CompilationRequest>[];
|
||||
|
||||
void _handleCompilationRequest(_CompilationRequest request) async {
|
||||
Future<void> _handleCompilationRequest(_CompilationRequest request) async {
|
||||
final bool isEmpty = _compilationQueue.isEmpty;
|
||||
_compilationQueue.add(request);
|
||||
// Only trigger processing if queue was empty - i.e. no other requests
|
||||
|
@ -503,7 +503,7 @@ flutter:
|
||||
});
|
||||
|
||||
group('FlutterManifest with MemoryFileSystem', () {
|
||||
void assertSchemaIsReadable() async {
|
||||
Future<void> assertSchemaIsReadable() async {
|
||||
const String manifest = '''
|
||||
name: test
|
||||
dependencies:
|
||||
@ -529,18 +529,18 @@ flutter:
|
||||
);
|
||||
}
|
||||
|
||||
testUsingContext('Validate manifest on original fs', () async {
|
||||
testUsingContext('Validate manifest on original fs', () {
|
||||
assertSchemaIsReadable();
|
||||
});
|
||||
|
||||
testUsingContextAndFs('Validate manifest on Posix FS',
|
||||
new MemoryFileSystem(style: FileSystemStyle.posix), () async {
|
||||
new MemoryFileSystem(style: FileSystemStyle.posix), () {
|
||||
assertSchemaIsReadable();
|
||||
}
|
||||
);
|
||||
|
||||
testUsingContextAndFs('Validate manifest on Windows FS',
|
||||
new MemoryFileSystem(style: FileSystemStyle.windows), () async {
|
||||
new MemoryFileSystem(style: FileSystemStyle.windows), () {
|
||||
assertSchemaIsReadable();
|
||||
}
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user