Apply void_checks lint. (#48267)

This commit is contained in:
Ian Hickson 2020-01-13 10:03:01 -08:00 committed by Flutter GitHub Bot
parent ab36346af6
commit e2b169ebd3
7 changed files with 9 additions and 12 deletions

View file

@ -199,4 +199,4 @@ linter:
# - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182
# - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review
- valid_regexps
# - void_checks # not yet tested
- void_checks

View file

@ -911,7 +911,7 @@ class _TextFieldState extends State<TextField> implements TextSelectionGestureDe
void _handleHover(bool hovering) {
if (hovering != _isHovering) {
setState(() {
return _isHovering = hovering;
_isHovering = hovering;
});
}
}

View file

@ -1914,9 +1914,11 @@ void main() {
'--- example property at max length --',
style: propertyStyle,
),
DiagnosticsProperty<void>(null,
'Message that is not allowed to wrap even though it is very long. Message that is not allowed to wrap even though it is very long. Message that is not allowed to wrap even though it is very long. Message that is not allowed to wrap.',
allowWrap: false),
DiagnosticsProperty<String>(
null,
'Message that is not allowed to wrap even though it is very long. Message that is not allowed to wrap even though it is very long. Message that is not allowed to wrap even though it is very long. Message that is not allowed to wrap.',
allowWrap: false,
),
DiagnosticsNode.message(
'--- example property at max length --',
style: propertyStyle,

View file

@ -177,7 +177,6 @@ void main() {
TestAction.key: () => TestAction(
onInvoke: (FocusNode node, Intent intent) {
invoked = true;
return true;
},
),
},
@ -215,7 +214,6 @@ void main() {
TestAction.key: () => TestAction(
onInvoke: (FocusNode node, Intent intent) {
invoked = true;
return true;
},
),
},
@ -254,7 +252,6 @@ void main() {
TestAction.key: () => TestAction(
onInvoke: (FocusNode node, Intent intent) {
invoked = true;
return true;
},
),
},

View file

@ -53,7 +53,7 @@ void main() {
void test(String description, FutureOr<void> body()) {
test_package.test(description, () {
return io.IOOverrides.runZoned<FutureOr<void>>(
io.IOOverrides.runZoned<FutureOr<void>>(
body,
createDirectory: (String path) => fs.directory(path),
createFile: (String path) => fs.file(path),

View file

@ -643,7 +643,6 @@ class BuildDaemonCreator {
if (testTargets.hasBuildFilters) {
b.buildFilters.addAll(testTargets.buildFilters);
}
return b;
}));
}
}

View file

@ -956,9 +956,8 @@ abstract class ResidentRunner {
}
}
Future<void> _serviceProtocolDone(dynamic object) {
Future<void> _serviceProtocolDone(dynamic object) async {
globals.printTrace('Service protocol connection closed.');
return Future<void>.value(object);
}
Future<void> _serviceProtocolError(dynamic error, StackTrace stack) {