Commit e2b169eb authored by Ian Hickson's avatar Ian Hickson Committed by Flutter GitHub Bot

Apply void_checks lint. (#48267)

parent ab36346a
......@@ -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
......@@ -911,7 +911,7 @@ class _TextFieldState extends State<TextField> implements TextSelectionGestureDe
void _handleHover(bool hovering) {
if (hovering != _isHovering) {
setState(() {
return _isHovering = hovering;
_isHovering = hovering;
});
}
}
......
......@@ -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,
......
......@@ -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;
},
),
},
......
......@@ -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),
......
......@@ -643,7 +643,6 @@ class BuildDaemonCreator {
if (testTargets.hasBuildFilters) {
b.buildFilters.addAll(testTargets.buildFilters);
}
return b;
}));
}
}
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment