Devon asked me to revert commit c4d1b31b74.
Merging on red to fix the build.
This commit is contained in:
@@ -87,8 +87,7 @@ class AnalyzeOnce extends AnalyzeBase {
|
||||
}
|
||||
});
|
||||
server.onErrors.listen((FileAnalysisErrors fileErrors) {
|
||||
// Record the issues found (but filter out to do comments).
|
||||
errors.addAll(fileErrors.errors.where((AnalysisError error) => error.type != 'TODO'));
|
||||
errors.addAll(fileErrors.errors);
|
||||
});
|
||||
|
||||
await server.start();
|
||||
@@ -149,9 +148,9 @@ class AnalyzeOnce extends AnalyzeBase {
|
||||
final int errorCount = errors.length;
|
||||
printStatus('');
|
||||
if (undocumentedMembers > 0) {
|
||||
throwToolExit('$errorCount ${pluralize('issue', errorCount)} found (ran in ${seconds}s; $dartdocMessage).');
|
||||
throwToolExit('$errorCount ${pluralize('issue', errorCount)} found. (ran in ${seconds}s; $dartdocMessage)');
|
||||
} else {
|
||||
throwToolExit('$errorCount ${pluralize('issue', errorCount)} found (ran in ${seconds}s).');
|
||||
throwToolExit('$errorCount ${pluralize('issue', errorCount)} found. (ran in ${seconds}s)');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ void main() {
|
||||
'warning $analyzerSeparator The parameter \'onPressed\' is required',
|
||||
'info $analyzerSeparator The method \'_incrementCounter\' isn\'t used',
|
||||
],
|
||||
exitMessageContains: '2 issues found',
|
||||
exitMessageContains: '2 issues found.',
|
||||
toolExit: true,
|
||||
);
|
||||
}, timeout: allowForSlowAnalyzeTests);
|
||||
@@ -123,7 +123,7 @@ void main() {
|
||||
'info $analyzerSeparator The method \'_incrementCounter\' isn\'t used',
|
||||
'info $analyzerSeparator Only throw instances of classes extending either Exception or Error',
|
||||
],
|
||||
exitMessageContains: '3 issues found',
|
||||
exitMessageContains: '3 issues found.',
|
||||
toolExit: true,
|
||||
);
|
||||
}, timeout: allowForSlowAnalyzeTests);
|
||||
@@ -154,7 +154,7 @@ void bar() {
|
||||
statusTextContains: <String>[
|
||||
'Analyzing',
|
||||
],
|
||||
exitMessageContains: '1 issue found',
|
||||
exitMessageContains: '1 issue found.',
|
||||
toolExit: true,
|
||||
);
|
||||
} finally {
|
||||
@@ -178,24 +178,6 @@ StringBuffer bar = StringBuffer('baz');
|
||||
tryToDelete(tempDir);
|
||||
}
|
||||
});
|
||||
|
||||
testUsingContext('returns no issues for todo comments', () async {
|
||||
const String contents = '''
|
||||
// TODO(foobar):
|
||||
StringBuffer bar = StringBuffer('baz');
|
||||
''';
|
||||
final Directory tempDir = fs.systemTempDirectory.createTempSync('flutter_analyze_once_test_4.');
|
||||
tempDir.childFile('main.dart').writeAsStringSync(contents);
|
||||
try {
|
||||
await runCommand(
|
||||
command: AnalyzeCommand(workingDirectory: fs.directory(tempDir)),
|
||||
arguments: <String>['analyze'],
|
||||
statusTextContains: <String>['No issues found!'],
|
||||
);
|
||||
} finally {
|
||||
tryToDelete(tempDir);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user