From 95d9f0a74560d3c954d29dc37ba3212e3e4924d9 Mon Sep 17 00:00:00 2001 From: Denis Voytyuk <5462781+denisvmedia@users.noreply.github.com> Date: Sat, 30 Nov 2024 10:01:57 +0100 Subject: [PATCH] deep-exit: fix mixed receiver type (lintDeepExit) --- rule/deep_exit.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rule/deep_exit.go b/rule/deep_exit.go index ef81eb890..8441b50de 100644 --- a/rule/deep_exit.go +++ b/rule/deep_exit.go @@ -17,7 +17,7 @@ func (*DeepExitRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failure { failures = append(failures, failure) } - w := lintDeepExit{onFailure: onFailure, isTestFile: file.IsTest()} + w := &lintDeepExit{onFailure: onFailure, isTestFile: file.IsTest()} ast.Walk(w, file.AST) return failures } @@ -32,7 +32,7 @@ type lintDeepExit struct { isTestFile bool } -func (w lintDeepExit) Visit(node ast.Node) ast.Visitor { +func (w *lintDeepExit) Visit(node ast.Node) ast.Visitor { if fd, ok := node.(*ast.FuncDecl); ok { if w.mustIgnore(fd) { return nil // skip analysis of this function