Revert "re-write flutter analyze (the single-shot and --flutter-repo) to use the analysis server (#16281)" (#16482)

This reverts commit 2f41ea546f.
This commit is contained in:
Devon Carew
2018-04-11 16:49:38 -07:00
committed by GitHub
parent 2f41ea546f
commit 071485258f
17 changed files with 983 additions and 446 deletions

View File

@@ -185,8 +185,6 @@ Future<Null> main() async {
}
}
buffer.add('');
buffer.add('// ignore_for_file: unused_element');
buffer.add('');
final List<Line> lines = new List<Line>.filled(buffer.length, null, growable: true);
for (Section section in sections) {
buffer.addAll(section.strings);
@@ -205,7 +203,7 @@ dependencies:
print('Found $sampleCodeSections sample code sections.');
final Process process = await Process.start(
_flutter,
<String>['analyze', '--no-preamble', '--no-congratulate', mainDart.parent.path],
<String>['analyze', '--no-preamble', mainDart.path],
workingDirectory: temp.path,
);
stderr.addStream(process.stderr);
@@ -214,6 +212,10 @@ dependencies:
errors.removeAt(0);
if (errors.first.startsWith('Running "flutter packages get" in '))
errors.removeAt(0);
if (errors.first.startsWith('Analyzing '))
errors.removeAt(0);
if (errors.last.endsWith(' issues found.') || errors.last.endsWith(' issue found.'))
errors.removeLast();
int errorCount = 0;
for (String error in errors) {
final String kBullet = Platform.isWindows ? ' - ' : ' • ';