| Index: pkg/analyzer_cli/lib/src/analyzer_impl.dart
|
| diff --git a/pkg/analyzer_cli/lib/src/analyzer_impl.dart b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
|
| index d3734fd573328d523c350dd38690576cbf8bc987..4b9a88e4197f9b2c07f0d2c3bd7e2e67fe770bd3 100644
|
| --- a/pkg/analyzer_cli/lib/src/analyzer_impl.dart
|
| +++ b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
|
| @@ -64,20 +64,6 @@ class AnalyzerImpl {
|
| AnalyzerImpl(this.analysisOptions, this.context, this.analysisDriver,
|
| this.librarySource, this.options, this.stats, this.startTime);
|
|
|
| - /// Returns the maximal [ErrorSeverity] of the recorded errors.
|
| - ErrorSeverity computeMaxErrorSeverity() {
|
| - ErrorSeverity status = ErrorSeverity.NONE;
|
| - for (AnalysisErrorInfo errorInfo in errorInfos) {
|
| - for (AnalysisError error in errorInfo.errors) {
|
| - if (_defaultSeverityProcessor(error) == null) {
|
| - continue;
|
| - }
|
| - status = status.max(computeSeverity(error, options, analysisOptions));
|
| - }
|
| - }
|
| - return status;
|
| - }
|
| -
|
| void addCompilationUnitSource(
|
| CompilationUnitElement unit, Set<CompilationUnitElement> units) {
|
| if (unit == null || !units.add(unit)) {
|
| @@ -123,6 +109,20 @@ class AnalyzerImpl {
|
| return await _analyze(printMode, formatter);
|
| }
|
|
|
| + /// Returns the maximal [ErrorSeverity] of the recorded errors.
|
| + ErrorSeverity computeMaxErrorSeverity() {
|
| + ErrorSeverity status = ErrorSeverity.NONE;
|
| + for (AnalysisErrorInfo errorInfo in errorInfos) {
|
| + for (AnalysisError error in errorInfo.errors) {
|
| + if (_defaultSeverityProcessor(error) == null) {
|
| + continue;
|
| + }
|
| + status = status.max(computeSeverity(error, options, analysisOptions));
|
| + }
|
| + }
|
| + return status;
|
| + }
|
| +
|
| /// Fills [errorInfos] using [sources].
|
| Future<Null> prepareErrors() async {
|
| PerformanceTag previous = _prepareErrorsTag.makeCurrent();
|
| @@ -188,6 +188,9 @@ class AnalyzerImpl {
|
| return computeMaxErrorSeverity();
|
| }
|
|
|
| + ErrorSeverity _defaultSeverityProcessor(AnalysisError error) =>
|
| + determineProcessedSeverity(error, options, analysisOptions);
|
| +
|
| /// Returns true if we want to report diagnostics for this library.
|
| bool _isAnalyzedLibrary(LibraryElement library) {
|
| Source source = library.source;
|
| @@ -204,6 +207,7 @@ class AnalyzerImpl {
|
| }
|
| }
|
|
|
| + // TODO(devoncarew): This is never called.
|
| /// Determine whether the given URI refers to a package being analyzed.
|
| bool _isAnalyzedPackage(Uri uri) {
|
| if (uri.scheme != 'package' || uri.pathSegments.isEmpty) {
|
| @@ -221,7 +225,6 @@ class AnalyzerImpl {
|
| }
|
| }
|
|
|
| - // TODO(devoncarew): This is never called.
|
| void _printColdPerf() {
|
| // Print cold VM performance numbers.
|
| int totalTime = currentTimeMillis - startTime;
|
| @@ -237,9 +240,6 @@ class AnalyzerImpl {
|
| outSink.writeln("total-cold:$totalTime");
|
| }
|
|
|
| - ErrorSeverity _defaultSeverityProcessor(AnalysisError error) =>
|
| - determineProcessedSeverity(error, options, analysisOptions);
|
| -
|
| Future<LibraryElement> _resolveLibrary() async {
|
| PerformanceTag previous = _resolveLibraryTag.makeCurrent();
|
| try {
|
|
|