From ddc737624d34f74e07c24b4bf43520501f27c36f Mon Sep 17 00:00:00 2001 From: Phil Quitslund Date: Tue, 5 Nov 2019 09:01:05 -0800 Subject: [PATCH] tidying (#1820) --- test/_data/close_sinks/src/a.dart | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/test/_data/close_sinks/src/a.dart b/test/_data/close_sinks/src/a.dart index dde96381e..cf640b468 100644 --- a/test/_data/close_sinks/src/a.dart +++ b/test/_data/close_sinks/src/a.dart @@ -2,8 +2,15 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:io'; +// ignore_for_file: prefer_initializing_formals +// ignore_for_file: unnecessary_new +// ignore_for_file: unnecessary_this +// ignore_for_file: unused_field +// ignore_for_file: unused_local_variable +// ignore_for_file: use_setters_to_change_properties + import 'dart:async'; +import 'dart:io'; class MockIOSink implements Sink { @override @@ -20,14 +27,14 @@ void inScope() { class A { IOSink _sinkA; // LINT - void init(filename) { + void init(String filename) { _sinkA = new File(filename).openWrite(); } } class B { IOSink _sinkB; - void init(filename) { + void init(String filename) { _sinkB = new File(filename).openWrite(); // OK } @@ -38,11 +45,11 @@ class B { class B1 { Socket _socketB1; - Future init(filename) async { + Future init(String filename) async { _socketB1 = await Socket.connect(null /*address*/, 1234); // OK } - void dispose(filename) { + void dispose(String filename) { _socketB1.destroy(); } } @@ -79,7 +86,7 @@ class C3 { } class D { - IOSink init(filename) { + IOSink init(String filename) { IOSink _sinkF = new File(filename).openWrite(); // OK return _sinkF; } @@ -136,4 +143,4 @@ class CascadeSink { ..add(null) ..close(); } -} \ No newline at end of file +}