getProcessor static method
Returns an error processor associated in the analysisOptions
for the
given error
, or null
if none is found.
Implementation
static ErrorProcessor? getProcessor(
// TODO(srawlins): Make `analysisOptions` non-nullable, in a breaking
// change release.
AnalysisOptions? analysisOptions,
AnalysisError error,
) {
return analysisOptions?.errorProcessors
.firstWhereOrNull((processor) => processor.appliesTo(error));
}