anchor.diff:    }
   
     static bool isIgnorable(String filePath, ErrorCode code) {
  +    return _UnignorableNames.isIgnorable(
  +      code,
  +      isFlutter: filePath.contains('flutter'),
  +      isDart2jsTest: filePath.contains('tests/compiler/dart2js') ||
  +          filePath.contains('pkg/compiler/test'),
  +    );
  +  }
  +}
  +
  +/// Helper for caching unignorable names.
  +class _UnignorableNames {
  +  static Set<String> _forFlutter;
  +  static Set<String> _forDart2jsTest;
  +  static Set<String> _forOther;
  +
  +  static Set<String> forFile(String filePath) {
  +    var isFlutter = filePath.contains('flutter');
  +    var isDart2jsTest = filePath.contains('tests/compiler/dart2js') ||
  +        filePath.contains('pkg/compiler/test');
  +
  +    if (isFlutter) {
  +      if (_forFlutter != null) {
  +        return _forFlutter;
  +      }
  +    } else if (isDart2jsTest) {
  +      if (_forDart2jsTest != null) {
  +        return _forDart2jsTest;
  +      }
  +    } else {
  +      if (_forOther != null) {
  +        return _forOther;
  +      }
  +    }
  +
  +    var unignorableNames = <String>{};
  +    for (var code in errorCodeValues) {
  +      if (!isIgnorable(code,
  +          isFlutter: isFlutter, isDart2jsTest: isDart2jsTest)) {
  +        unignorableNames.add(code.name.toLowerCase());
  +        unignorableNames.add(code.uniqueName.toLowerCase());
  +      }
  +    }
  +
  +    if (isFlutter) {
  +      _forFlutter = unignorableNames;
  +    } else if (isDart2jsTest) {
  +      _forDart2jsTest = unignorableNames;
  +    } else {
  +      _forOther = unignorableNames;
  +    }
  +
  +    return unignorableNames;
  +  }
  +
  +  static bool isIgnorable(
  +    ErrorCode code, {
  +    @required bool isFlutter,
  +    @required bool isDart2jsTest,
  +  }) {
       if (code.isIgnorable) {
         return true;
       }
  
positive.code: import 'package:analyzer/src/error/codes.dart';
  import 'package:analyzer/src/generated/source.dart';
  import 'package:analyzer/src/ignore_comments/ignore_info.dart';
  
  /// Used to validate the ignore comments in a single file.
  class IgnoreValidator {
  
negative.code:   /// be ignored. Note that this list is incomplete. Plugins might well define
    /// diagnostics with a severity of `ERROR`, but we won't be able to flag their
    /// use because we have no visibility of them here.
    Set<String> _unignorableNames;
  
    /// Initialize a newly created validator to report any issues with ignore
    /// comments in the file being analyzed. The diagnostics will be reported to
  