@@ -12,18 +12,17 @@ import (
12
12
"github.com/golangci/golangci-lint/pkg/result"
13
13
)
14
14
15
- const forbidigoName = "forbidigo"
16
-
17
15
func NewForbidigo () * goanalysis.Linter {
16
+ const linterName = "forbidigo"
18
17
var mu sync.Mutex
19
18
var resIssues []goanalysis.Issue
20
19
21
20
analyzer := & analysis.Analyzer {
22
- Name : forbidigoName ,
21
+ Name : linterName ,
23
22
Doc : goanalysis .TheOnlyanalyzerDoc ,
24
23
}
25
24
return goanalysis .NewLinter (
26
- forbidigoName ,
25
+ linterName ,
27
26
"Forbids identifiers" ,
28
27
[]* analysis.Analyzer {analyzer },
29
28
nil ,
@@ -34,7 +33,7 @@ func NewForbidigo() *goanalysis.Linter {
34
33
var res []goanalysis.Issue
35
34
forbid , err := forbidigo .NewLinter (s .Forbid )
36
35
if err != nil {
37
- return nil , errors .Wrapf (err , "failed to create linter %q" , forbidigoName )
36
+ return nil , errors .Wrapf (err , "failed to create linter %q" , linterName )
38
37
}
39
38
40
39
for _ , file := range pass .Files {
@@ -46,7 +45,7 @@ func NewForbidigo() *goanalysis.Linter {
46
45
res = append (res , goanalysis .NewIssue (& result.Issue {
47
46
Pos : hint .Position (),
48
47
Text : hint .Details (),
49
- FromLinter : makezeroName ,
48
+ FromLinter : linterName ,
50
49
}, pass ))
51
50
}
52
51
}
0 commit comments