getProcessor static method

ErrorProcessor? getProcessor(
  1. HTAnalyzer? analyzer,
  2. HTError error
)

Return an error processor associated in the analysisOptions for the given error, or null if none is found.

Implementation

static ErrorProcessor? getProcessor(HTAnalyzer? analyzer, HTError error) {
  if (analyzer == null) {
    return null;
  }

  for (var processor in analyzer.errorProcessors) {
    if (processor.appliesTo(error)) {
      return processor;
    }
  }
  return null;
}