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

Unified Diff: pkg/analyzer/lib/source/error_processor.dart

Issue 2566013002: Implement 'analysis.getErrors' for the new driver. (Closed)
Patch Set: Created 4 years 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
Index: pkg/analyzer/lib/source/error_processor.dart
diff --git a/pkg/analyzer/lib/source/error_processor.dart b/pkg/analyzer/lib/source/error_processor.dart
index 9b09559026e0c9f84ecf087180879e1cf4a72d69..3404edc49a62ad390bc01e1c536f3304282cb302 100644
--- a/pkg/analyzer/lib/source/error_processor.dart
+++ b/pkg/analyzer/lib/source/error_processor.dart
@@ -87,19 +87,19 @@ class ErrorProcessor {
/// Check if this processor applies to the given [error].
bool appliesTo(AnalysisError error) => code == error.errorCode.name;
- /// Return an error processor associated with this [context] for the given
- /// [error], or `null` if none is found.
+ /// Return an error processor associated in the [analysisOptions] for the
+ /// given [error], or `null` if none is found.
static ErrorProcessor getProcessor(
- AnalysisContext context, AnalysisError error) {
- if (context == null) {
+ AnalysisOptions analysisOptions, AnalysisError error) {
+ if (analysisOptions == null) {
return null;
}
// Let the user configure how specific errors are processed.
- List<ErrorProcessor> processors = context.analysisOptions.errorProcessors;
+ List<ErrorProcessor> processors = analysisOptions.errorProcessors;
// Give strong mode a chance to upgrade it.
- if (context.analysisOptions.strongMode) {
+ if (analysisOptions.strongMode) {
processors = processors.toList();
processors.add(_StrongModeTypeErrorProcessor.instance);
}

Powered by Google App Engine
This is Rietveld 408576698