anchor.diff:  ''';
   
   class UseBuildContextSynchronously extends LintRule implements NodeLintRule {
  -  // todo (pq): use LinterContext.inTestDir() when available
  -  static final _testDirectories = [
  -    '${path.separator}test${path.separator}',
  -    '${path.separator}integration_test${path.separator}',
  -    '${path.separator}test_driver${path.separator}',
  -    '${path.separator}testing${path.separator}',
  -  ];
  -
     /// Flag to short-circuit `inTestDir` checking when running tests.
     final bool inTestMode;
   
  
positive.code: import 'package:analyzer/dart/ast/visitor.dart';
  import 'package:analyzer/dart/element/element.dart';
  import 'package:analyzer/dart/element/type.dart';
  import 'package:path/path.dart' as path;
  
  import '../analyzer.dart';
  import '../util/flutter_utils.dart';
  
negative.code:   void registerNodeProcessors(
        NodeLintRegistry registry, LinterContext context) {
      var unit = context.currentUnit.unit;
      if (inTestMode || !context.inTestDir(unit)) {
        var visitor = _Visitor(this);
        registry.addMethodInvocation(this, visitor);
        registry.addInstanceCreationExpression(this, visitor);
        registry.addFunctionExpressionInvocation(this, visitor);
      }
    }
  }
  
  