@@ -14,14 +14,14 @@ import (
14
14
"github.com/golangci/golangci-lint/pkg/result"
15
15
)
16
16
17
- const name = "forbidigo"
17
+ const linterName = "forbidigo"
18
18
19
19
func New (settings * config.ForbidigoSettings ) * goanalysis.Linter {
20
20
var mu sync.Mutex
21
21
var resIssues []goanalysis.Issue
22
22
23
23
analyzer := & analysis.Analyzer {
24
- Name : name ,
24
+ Name : linterName ,
25
25
Doc : goanalysis .TheOnlyanalyzerDoc ,
26
26
Run : func (pass * analysis.Pass ) (any , error ) {
27
27
issues , err := runForbidigo (pass , settings )
@@ -44,7 +44,7 @@ func New(settings *config.ForbidigoSettings) *goanalysis.Linter {
44
44
// But we cannot make this depend on the settings and have to mirror the mode chosen in GetAllSupportedLinterConfigs,
45
45
// therefore we have to use LoadModeTypesInfo in all cases.
46
46
return goanalysis .NewLinter (
47
- name ,
47
+ linterName ,
48
48
"Forbids identifiers" ,
49
49
[]* analysis.Analyzer {analyzer },
50
50
nil ,
@@ -73,7 +73,7 @@ func runForbidigo(pass *analysis.Pass, settings *config.ForbidigoSettings) ([]go
73
73
74
74
forbid , err := forbidigo .NewLinter (patterns , options ... )
75
75
if err != nil {
76
- return nil , fmt .Errorf ("failed to create linter %q: %w" , name , err )
76
+ return nil , fmt .Errorf ("failed to create linter %q: %w" , linterName , err )
77
77
}
78
78
79
79
var issues []goanalysis.Issue
@@ -94,7 +94,7 @@ func runForbidigo(pass *analysis.Pass, settings *config.ForbidigoSettings) ([]go
94
94
issues = append (issues , goanalysis .NewIssue (& result.Issue {
95
95
Pos : hint .Position (),
96
96
Text : hint .Details (),
97
- FromLinter : name ,
97
+ FromLinter : linterName ,
98
98
}, pass ))
99
99
}
100
100
}
0 commit comments