Skip to content

Commit 1a7f4b3

Browse files
committed
review: fix
1 parent ba81211 commit 1a7f4b3

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

pkg/golinters/perfsprint.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ import (
77
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
88
)
99

10-
func NewGoStrconv() *goanalysis.Linter {
10+
func NewPerfSprint() *goanalysis.Linter {
11+
a := analyzer.Analyzer
12+
1113
return goanalysis.NewLinter(
12-
"perfsprint",
13-
"Checks usages of `fmt.Sprintf` which have faster alternatives.",
14-
[]*analysis.Analyzer{analyzer.Analyzer},
14+
a.Name,
15+
a.Doc,
16+
[]*analysis.Analyzer{a},
1517
nil,
16-
).WithLoadMode(goanalysis.LoadModeSyntax)
18+
).WithLoadMode(goanalysis.LoadModeTypesInfo)
1719
}

pkg/lint/lintersdb/manager.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,9 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
713713
WithURL("https://github.com/kunwardeep/paralleltest"),
714714

715715
linter.NewConfig(golinters.NewPerfSprint()).
716-
WithSince("v1.54.2").
717-
WithPresets(linter.PresetStyle).
716+
WithSince("v1.55.0").
717+
WithLoadForGoAnalysis().
718+
WithPresets(linter.PresetPerformance).
718719
WithURL("https://github.com/catenacyber/perfsprint"),
719720

720721
linter.NewConfig(golinters.NewPreAlloc(preallocCfg)).

0 commit comments

Comments
 (0)