Skip to content

Commit 3984aad

Browse files
committed
fix: contextcheck
1 parent acaeb67 commit 3984aad

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/golinters/contextcheck/contextcheck.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@ package contextcheck
22

33
import (
44
"github.com/kkHAIKE/contextcheck"
5+
"golang.org/x/tools/go/analysis/passes/ctrlflow"
6+
"golang.org/x/tools/go/analysis/passes/inspect"
57

68
"github.com/golangci/golangci-lint/v2/pkg/goanalysis"
79
"github.com/golangci/golangci-lint/v2/pkg/lint/linter"
810
)
911

1012
func New() *goanalysis.Linter {
1113
analyzer := contextcheck.NewAnalyzer(contextcheck.Configuration{})
14+
// TODO(ldez) there is a problem with this linter:
15+
// I think the problem related to facts.
16+
// The BuildSSA pass has been changed inside (0.39.0):
17+
// https://github.com/golang/tools/commit/b74c09864920a69a4d2f6ef0ecb4f9cff226893a
18+
analyzer.Requires = append(analyzer.Requires, ctrlflow.Analyzer, inspect.Analyzer)
1219

1320
return goanalysis.
1421
NewLinterFromAnalyzer(analyzer).

0 commit comments

Comments
 (0)