anchor.diff:        NodeLintRegistry registry, LinterContext context) {
       var visitor = _Visitor(this);
       registry.addMethodDeclaration(this, visitor);
  +  }
  +}
  +
  +class _BodyVisitor extends RecursiveAstVisitor {
  +  List<ReturnStatement> returnStatements = [];
  +
  +  List<ReturnStatement> collectReturns(BlockFunctionBody body) {
  +    body.accept(this);
  +    return returnStatements;
  +  }
  +
  +  @override
  +  visitFunctionExpression(FunctionExpression node) {
  +    // Short-circuit visiting on Function expressions.
  +  }
  +
  +  @override
  +  visitReturnStatement(ReturnStatement node) {
  +    // Short-circuit if not returning this.
  +    if (!_returnsThis(node)) return;
  +
  +    returnStatements.add(node);
  +    super.visitReturnStatement(node);
     }
   }
   
  
positive.code: 
  ''';
  
  bool _isFunctionExpression(AstNode node) => node is FunctionExpression;
  
  bool _returnsThis(ReturnStatement node) => node.expression is ThisExpression;
  
  class AvoidReturningThis extends LintRule {
  
negative.code: 
      var body = node.body;
      if (body is BlockFunctionBody) {
        var returnStatements = _BodyVisitor().collectReturns(body);
        if (returnStatements.isNotEmpty) {
          rule.reportLint(returnStatements.first.expression);
        }
      } else if (body is ExpressionFunctionBody) {
  