add missing type parameter on methods (#22096)
This commit is contained in:
committed by
GitHub
parent
48fb726b01
commit
f62afdcf57
@@ -30,8 +30,8 @@ void main() {
|
||||
);
|
||||
final StreamController<String> stdout = StreamController<String>.broadcast();
|
||||
run.stdout
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
print('run:stdout: $line');
|
||||
stdout.add(line);
|
||||
@@ -46,12 +46,12 @@ void main() {
|
||||
}
|
||||
});
|
||||
run.stderr
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
stderr.writeln('run:stderr: $line');
|
||||
});
|
||||
run.exitCode.then((int exitCode) { ok = false; });
|
||||
run.exitCode.then<void>((int exitCode) { ok = false; });
|
||||
await Future.any<dynamic>(<Future<dynamic>>[ ready.future, run.exitCode ]);
|
||||
if (!ok)
|
||||
throw 'Failed to run test app.';
|
||||
@@ -114,14 +114,14 @@ class DriveHelper {
|
||||
<String>['drive', '--use-existing-app', 'http://127.0.0.1:$vmServicePort/', '--keep-app-running', '--driver', 'test_driver/commands_${name}_test.dart'],
|
||||
);
|
||||
drive.stdout
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
print('drive:stdout: $line');
|
||||
});
|
||||
drive.stderr
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
stderr.writeln('drive:stderr: $line');
|
||||
});
|
||||
|
||||
@@ -21,7 +21,7 @@ Future<Null> main() async {
|
||||
int publicMembers = 0;
|
||||
int otherErrors = 0;
|
||||
int otherLines = 0;
|
||||
await for (String entry in analysis.stdout.transform(utf8.decoder).transform(const LineSplitter())) {
|
||||
await for (String entry in analysis.stdout.transform<String>(utf8.decoder).transform<String>(const LineSplitter())) {
|
||||
entry = entry.trim();
|
||||
print('analyzer stdout: $entry');
|
||||
if (entry == 'Building flutter tool...') {
|
||||
@@ -36,7 +36,7 @@ Future<Null> main() async {
|
||||
otherLines += 1;
|
||||
}
|
||||
}
|
||||
await for (String entry in analysis.stderr.transform(utf8.decoder).transform(const LineSplitter())) {
|
||||
await for (String entry in analysis.stderr.transform<String>(utf8.decoder).transform<String>(const LineSplitter())) {
|
||||
print('analyzer stderr: $entry');
|
||||
if (entry.startsWith('[lint] ')) {
|
||||
// ignore this line
|
||||
|
||||
@@ -26,8 +26,8 @@ Future<void> testReload(Process process, { Future<void> Function() onListening }
|
||||
|
||||
int exitCode;
|
||||
process.stdout
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
print('attach:stdout: $line');
|
||||
stdout.add(line);
|
||||
@@ -43,14 +43,14 @@ Future<void> testReload(Process process, { Future<void> Function() onListening }
|
||||
finished.complete();
|
||||
});
|
||||
process.stderr
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
print('run:stderr: $line');
|
||||
stdout.add(line);
|
||||
});
|
||||
|
||||
process.exitCode.then((int processExitCode) { exitCode = processExitCode; });
|
||||
process.exitCode.then<void>((int processExitCode) { exitCode = processExitCode; });
|
||||
|
||||
Future<dynamic> eventOrExit(Future<Null> event) {
|
||||
return Future.any<dynamic>(<Future<dynamic>>[ event, process.exitCode ]);
|
||||
|
||||
@@ -45,7 +45,7 @@ Future<int> runTest() async {
|
||||
);
|
||||
int badLines = 0;
|
||||
TestStep step = TestStep.starting;
|
||||
await for (String entry in analysis.stdout.transform(utf8.decoder).transform(const LineSplitter())) {
|
||||
await for (String entry in analysis.stdout.transform<String>(utf8.decoder).transform<String>(const LineSplitter())) {
|
||||
print('test stdout ($step): $entry');
|
||||
if (step == TestStep.starting && entry == 'Building flutter tool...') {
|
||||
// ignore this line
|
||||
@@ -76,7 +76,7 @@ Future<int> runTest() async {
|
||||
}
|
||||
}
|
||||
}
|
||||
await for (String entry in analysis.stderr.transform(utf8.decoder).transform(const LineSplitter())) {
|
||||
await for (String entry in analysis.stderr.transform<String>(utf8.decoder).transform<String>(const LineSplitter())) {
|
||||
print('test stderr: $entry');
|
||||
badLines += 1;
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ class _Dependencies {
|
||||
.replaceAllMapped(_separatorExpr, (Match match) => '${match.group(1)}\n')
|
||||
.split('\n')
|
||||
// Expand escape sequences, so that '\ ', for example,ß becomes ' '
|
||||
.map((String path) => path.replaceAllMapped(_escapeExpr, (Match match) => match.group(1)).trim())
|
||||
.map<String>((String path) => path.replaceAllMapped(_escapeExpr, (Match match) => match.group(1)).trim())
|
||||
.where((String path) => path.isNotEmpty)
|
||||
.toSet();
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ void main() {
|
||||
<String>['run', '--verbose', '-d', device.deviceId, '--route', '/smuggle-it', 'lib/route.dart'],
|
||||
);
|
||||
run.stdout
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
print('run:stdout: $line');
|
||||
if (vmServicePort == null) {
|
||||
@@ -52,12 +52,12 @@ void main() {
|
||||
}
|
||||
});
|
||||
run.stderr
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
stderr.writeln('run:stderr: $line');
|
||||
});
|
||||
run.exitCode.then((int exitCode) { ok = false; });
|
||||
run.exitCode.then<void>((int exitCode) { ok = false; });
|
||||
await Future.any<dynamic>(<Future<dynamic>>[ ready.future, run.exitCode ]);
|
||||
if (!ok)
|
||||
throw 'Failed to run test app.';
|
||||
@@ -67,14 +67,14 @@ void main() {
|
||||
<String>['drive', '--use-existing-app', 'http://127.0.0.1:$vmServicePort/', '--no-keep-app-running', 'lib/route.dart'],
|
||||
);
|
||||
drive.stdout
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
print('drive:stdout: $line');
|
||||
});
|
||||
drive.stderr
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
stderr.writeln('drive:stderr: $line');
|
||||
});
|
||||
|
||||
@@ -27,7 +27,7 @@ void main() {
|
||||
}
|
||||
|
||||
Stream<String> transformToLines(Stream<List<int>> byteStream) {
|
||||
return byteStream.transform(utf8.decoder).transform(const LineSplitter());
|
||||
return byteStream.transform<String>(utf8.decoder).transform<String>(const LineSplitter());
|
||||
}
|
||||
|
||||
task(() async {
|
||||
@@ -74,7 +74,7 @@ void main() {
|
||||
transformToLines(run.stderr).listen((String line) {
|
||||
stderr.writeln('run:stderr: $line');
|
||||
});
|
||||
run.exitCode.then((int exitCode) {
|
||||
run.exitCode.then<void>((int exitCode) {
|
||||
ok = false;
|
||||
});
|
||||
await Future.any<dynamic>(<Future<dynamic>>[ready.future, run.exitCode]);
|
||||
|
||||
@@ -29,8 +29,8 @@ void main() {
|
||||
final List<String> stderr = <String>[];
|
||||
int runExitCode;
|
||||
run.stdout
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
print('run:stdout: $line');
|
||||
stdout.add(line);
|
||||
@@ -38,13 +38,13 @@ void main() {
|
||||
ready.complete();
|
||||
});
|
||||
run.stderr
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
print('run:stderr: $line');
|
||||
stdout.add(line);
|
||||
});
|
||||
run.exitCode.then((int exitCode) { runExitCode = exitCode; });
|
||||
run.exitCode.then<void>((int exitCode) { runExitCode = exitCode; });
|
||||
await Future.any<dynamic>(<Future<dynamic>>[ ready.future, run.exitCode ]);
|
||||
if (runExitCode != null)
|
||||
throw 'Failed to run test app; runner unexpected exited, with exit code $runExitCode.';
|
||||
|
||||
@@ -29,8 +29,8 @@ void main() {
|
||||
<String>['run', '--verbose', '-d', device.deviceId, 'lib/main.dart'],
|
||||
);
|
||||
run.stdout
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
print('run:stdout: $line');
|
||||
if (vmServicePort == null) {
|
||||
@@ -44,12 +44,12 @@ void main() {
|
||||
}
|
||||
});
|
||||
run.stderr
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
stderr.writeln('run:stderr: $line');
|
||||
});
|
||||
run.exitCode.then((int exitCode) { ok = false; });
|
||||
run.exitCode.then<void>((int exitCode) { ok = false; });
|
||||
await Future.any<dynamic>(<Future<dynamic>>[ ready.future, run.exitCode ]);
|
||||
if (!ok)
|
||||
throw 'Failed to run test app.';
|
||||
|
||||
@@ -54,7 +54,7 @@ Future<double> findCostsForRepo() async {
|
||||
workingDirectory: flutterDirectory.path,
|
||||
);
|
||||
double total = 0.0;
|
||||
await for (String entry in git.stdout.transform(utf8.decoder).transform(const LineSplitter()))
|
||||
await for (String entry in git.stdout.transform<String>(utf8.decoder).transform<String>(const LineSplitter()))
|
||||
total += await findCostsForFile(File(path.join(flutterDirectory.path, entry)));
|
||||
final int gitExitCode = await git.exitCode;
|
||||
if (gitExitCode != 0)
|
||||
|
||||
Reference in New Issue
Block a user