Revert "Enable avoid_print lint. (#91332)" (#91438)

This reverts commit cb378edc9e.
This commit is contained in:
Mouad Debbar
2021-10-07 16:16:17 -04:00
committed by GitHub
parent d68f95676c
commit c2ea78d231
85 changed files with 246 additions and 359 deletions

View File

@@ -25,12 +25,6 @@
/// about any additional exports that you add to this file, as doing so will
/// increase the API surface that we have to test in Flutter tools, and the APIs
/// in `dart:io` can sometimes be hard to use in tests.
// We allow `print()` in this file as a fallback for writing to the terminal via
// regular stdout/stderr/stdio paths. Everything else in the flutter_tools
// library should route terminal I/O through the [Stdio] class defined below.
// ignore_for_file: avoid_print
import 'dart:async';
import 'dart:io' as io
show

View File

@@ -247,7 +247,6 @@ class Cache {
}
} on Exception catch (error) {
// There is currently no logger attached since this is computed at startup.
// ignore: avoid_print
print(userMessages.runnerNoRoot('$error'));
}
return normalize('.');

View File

@@ -307,7 +307,6 @@ class DaemonDomain extends Domain {
if (message.level == 'status') {
// We use `print()` here instead of `stdout.writeln()` in order to
// capture the print output for testing.
// ignore: avoid_print
print(message.message);
} else if (message.level == 'error') {
globals.stdio.stderrWrite('${message.message}\n');

View File

@@ -96,7 +96,7 @@ class MacOSDevice extends DesktopDevice {
'open', package.applicationBundle(buildMode),
]).then((ProcessResult result) {
if (result.exitCode != 0) {
_logger.printError('Failed to foreground app; open returned ${result.exitCode}');
print('Failed to foreground app; open returned ${result.exitCode}');
}
});
}