anchor.diff:        NodeLintRegistry registry, LinterContext context) {
       var visitor = _Visitor(this, context);
       registry.addMethodDeclaration(this, visitor);
  +  }
  +}
  +
  +class _BodyVisitor extends RecursiveAstVisitor {
  +  bool found = false;
  +
  +  final DartType returnType;
  +  _BodyVisitor(this.returnType);
  +
  +  bool containsInstanceCreation(FunctionBody body) {
  +    body.accept(this);
  +    return found;
  +  }
  +
  +  @override
  +  visitInstanceCreationExpression(InstanceCreationExpression node) {
  +    found = node.staticType == returnType;
  +    if (!found) {
  +      super.visitInstanceCreationExpression(node);
  +    }
     }
   }
   
  
positive.code: import 'package:analyzer/dart/element/type.dart';
  
  import '../analyzer.dart';
  import '../extensions.dart';
  
  const _desc =
      r'Prefer defining constructors instead of static methods to create instances.';
  
negative.code: ```
  ''';
  
  bool _hasNewInvocation(DartType returnType, FunctionBody body) =>
      _BodyVisitor(returnType).containsInstanceCreation(body);
  
  class PreferConstructorsInsteadOfStaticMethods extends LintRule {
    PreferConstructorsInsteadOfStaticMethods()
  