Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(494)

Unified Diff: pkg/analyzer_cli/lib/src/analyzer_impl.dart

Issue 2933753002: Run the sorter to reduce code churn (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/tool/summary/mini_ast.dart ('k') | pkg/analyzer_cli/lib/src/ansi.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « pkg/analyzer/tool/summary/mini_ast.dart ('k') | pkg/analyzer_cli/lib/src/ansi.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698