Skip to content

Commit

Permalink
Fix forbidigo linter name in reports (#1590)
Browse files Browse the repository at this point in the history
Fix cut-and-paste error with linter name.

Fixes #1589
  • Loading branch information
ashanbrown authored Dec 28, 2020
1 parent 64d823c commit 750b4ba
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pkg/golinters/forbidigo.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@ import (
"github.com/golangci/golangci-lint/pkg/result"
)

const forbidigoName = "forbidigo"

func NewForbidigo() *goanalysis.Linter {
const linterName = "forbidigo"
var mu sync.Mutex
var resIssues []goanalysis.Issue

analyzer := &analysis.Analyzer{
Name: forbidigoName,
Name: linterName,
Doc: goanalysis.TheOnlyanalyzerDoc,
}
return goanalysis.NewLinter(
forbidigoName,
linterName,
"Forbids identifiers",
[]*analysis.Analyzer{analyzer},
nil,
Expand All @@ -34,7 +33,7 @@ func NewForbidigo() *goanalysis.Linter {
var res []goanalysis.Issue
forbid, err := forbidigo.NewLinter(s.Forbid)
if err != nil {
return nil, errors.Wrapf(err, "failed to create linter %q", forbidigoName)
return nil, errors.Wrapf(err, "failed to create linter %q", linterName)
}

for _, file := range pass.Files {
Expand All @@ -46,7 +45,7 @@ func NewForbidigo() *goanalysis.Linter {
res = append(res, goanalysis.NewIssue(&result.Issue{
Pos: hint.Position(),
Text: hint.Details(),
FromLinter: makezeroName,
FromLinter: linterName,
}, pass))
}
}
Expand Down

0 comments on commit 750b4ba

Please sign in to comment.