@@ -8,22 +8,23 @@ import (
8
8
"golang.org/x/tools/go/analysis"
9
9
"golang.org/x/tools/go/packages"
10
10
11
+ "github.com/golangci/golangci-lint/pkg/config"
11
12
"github.com/golangci/golangci-lint/pkg/goanalysis"
12
13
"github.com/golangci/golangci-lint/pkg/lint/linter"
13
14
"github.com/golangci/golangci-lint/pkg/result"
14
15
)
15
16
16
17
const linterName = "gochecksumtype"
17
18
18
- func New () * goanalysis.Linter {
19
+ func New (settings * config. GoChecksumTypeSettings ) * goanalysis.Linter {
19
20
var mu sync.Mutex
20
21
var resIssues []goanalysis.Issue
21
22
22
23
analyzer := & analysis.Analyzer {
23
24
Name : linterName ,
24
25
Doc : goanalysis .TheOnlyanalyzerDoc ,
25
26
Run : func (pass * analysis.Pass ) (any , error ) {
26
- issues , err := runGoCheckSumType (pass )
27
+ issues , err := runGoCheckSumType (pass , settings )
27
28
if err != nil {
28
29
return nil , err
29
30
}
@@ -50,7 +51,7 @@ func New() *goanalysis.Linter {
50
51
}).WithLoadMode (goanalysis .LoadModeTypesInfo )
51
52
}
52
53
53
- func runGoCheckSumType (pass * analysis.Pass ) ([]goanalysis.Issue , error ) {
54
+ func runGoCheckSumType (pass * analysis.Pass , settings * config. GoChecksumTypeSettings ) ([]goanalysis.Issue , error ) {
54
55
var resIssues []goanalysis.Issue
55
56
56
57
pkg := & packages.Package {
@@ -61,7 +62,8 @@ func runGoCheckSumType(pass *analysis.Pass) ([]goanalysis.Issue, error) {
61
62
}
62
63
63
64
var unknownError error
64
- errors := gochecksumtype .Run ([]* packages.Package {pkg })
65
+ errors := gochecksumtype .Run ([]* packages.Package {pkg },
66
+ gochecksumtype.Config {DefaultSignifiesExhaustive : settings .DefaultSignifiesExhaustive })
65
67
for _ , err := range errors {
66
68
err , ok := err .(gochecksumtype.Error )
67
69
if ! ok {
0 commit comments