Skip to content

Commit 4ea9468

Browse files
build(deps): bump github.com/catenacyber/perfsprint from 0.5.0 to 0.6.0 (#4346)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
1 parent ee98b50 commit 4ea9468

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ require (
2727
github.com/breml/errchkjson v0.3.6
2828
github.com/butuzov/ireturn v0.2.2
2929
github.com/butuzov/mirror v1.1.0
30-
github.com/catenacyber/perfsprint v0.5.0
30+
github.com/catenacyber/perfsprint v0.6.0
3131
github.com/charithe/durationcheck v0.0.10
3232
github.com/curioswitch/go-reassign v0.2.0
3333
github.com/daixiang0/gci v0.12.1

go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/golinters/perfsprint.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ import (
1111
func NewPerfSprint(settings *config.PerfSprintSettings) *goanalysis.Linter {
1212
a := analyzer.New()
1313

14-
var cfg map[string]map[string]any
14+
cfg := map[string]map[string]any{
15+
a.Name: {"fiximports": false},
16+
}
17+
1518
if settings != nil {
16-
cfg = map[string]map[string]any{
17-
a.Name: {
18-
"int-conversion": settings.IntConversion,
19-
"err-error": settings.ErrError,
20-
"errorf": settings.ErrorF,
21-
"sprintf1": settings.SprintF1,
22-
},
23-
}
19+
cfg[a.Name]["int-conversion"] = settings.IntConversion
20+
cfg[a.Name]["err-error"] = settings.ErrError
21+
cfg[a.Name]["errorf"] = settings.ErrorF
22+
cfg[a.Name]["sprintf1"] = settings.SprintF1
2423
}
2524

2625
return goanalysis.NewLinter(

test/testdata/perfsprint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
package testdata
33

44
import (
5-
"fmt" // want "Fix imports"
5+
"fmt"
66
)
77

88
func TestPerfsprint() {

test/testdata/perfsprint_custom.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
package testdata
44

55
import (
6-
"fmt" // want "Fix imports"
6+
"fmt"
77
)
88

99
func TestPerfsprint2() {

0 commit comments

Comments
 (0)