File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 7
7
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
8
8
)
9
9
10
- func NewGoStrconv () * goanalysis.Linter {
10
+ func NewPerfSprint () * goanalysis.Linter {
11
11
return goanalysis .NewLinter (
12
12
"perfsprint" ,
13
13
"Checks usages of `fmt.Sprintf` which have faster alternatives." ,
Original file line number Diff line number Diff line change @@ -714,7 +714,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
714
714
715
715
linter .NewConfig (golinters .NewPerfSprint ()).
716
716
WithSince ("v1.54.2" ).
717
- WithPresets (linter .PresetStyle ).
717
+ WithPresets (linter .PresetPerformance ).
718
718
WithURL ("https://github.com/catenacyber/perfsprint" ),
719
719
720
720
linter .NewConfig (golinters .NewPreAlloc (preallocCfg )).
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ package testdata
4
4
import "fmt"
5
5
6
6
func SprintfCouldBeStrconv () {
7
- fmt .Sprintf ("%d" , 42 ) // want "Sprintf can be replaced with faster strconv.Itoa"
7
+ fmt .Sprintf ("%d" , 42 ) // want "fmt. Sprintf can be replaced with faster function strconv.Itoa"
8
8
}
You can’t perform that action at this time.
0 commit comments