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

Unified Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1394023004: allow computeErrors to work on non-.dart files (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 893ae9f5a51642d64268b47f3040c7614057614a..8674f94f7a9ebb6d71afc3ff7f726edd028c0be2 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -583,12 +583,10 @@ class AnalysisContextImpl implements InternalAnalysisContext {
@override
List<AnalysisError> computeErrors(Source source) {
String name = source.shortName;
- if (AnalysisEngine.isDartFileName(name)) {
- return computeResult(source, DART_ERRORS);
- } else if (AnalysisEngine.isHtmlFileName(name)) {
+ if (AnalysisEngine.isHtmlFileName(name)) {
return computeResult(source, HTML_ERRORS);
}
- return AnalysisError.NO_ERRORS;
+ return computeResult(source, DART_ERRORS);
}
@override
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698