Skip to content

Commit

Permalink
build(deps): bump github.com/catenacyber/perfsprint from 0.5.0 to 0.6…
Browse files Browse the repository at this point in the history
….0 (golangci#4346)

Co-authored-by: Fernandez Ludovic <[email protected]>
  • Loading branch information
2 people authored and Antonboom committed Mar 3, 2024
1 parent ea03bde commit a990dfe
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ require (
github.com/breml/errchkjson v0.3.6
github.com/butuzov/ireturn v0.2.2
github.com/butuzov/mirror v1.1.0
github.com/catenacyber/perfsprint v0.5.0
github.com/catenacyber/perfsprint v0.6.0
github.com/charithe/durationcheck v0.0.10
github.com/curioswitch/go-reassign v0.2.0
github.com/daixiang0/gci v0.12.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 8 additions & 9 deletions pkg/golinters/perfsprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ import (
func NewPerfSprint(settings *config.PerfSprintSettings) *goanalysis.Linter {
a := analyzer.New()

var cfg map[string]map[string]any
cfg := map[string]map[string]any{
a.Name: {"fiximports": false},
}

if settings != nil {
cfg = map[string]map[string]any{
a.Name: {
"int-conversion": settings.IntConversion,
"err-error": settings.ErrError,
"errorf": settings.ErrorF,
"sprintf1": settings.SprintF1,
},
}
cfg[a.Name]["int-conversion"] = settings.IntConversion
cfg[a.Name]["err-error"] = settings.ErrError
cfg[a.Name]["errorf"] = settings.ErrorF
cfg[a.Name]["sprintf1"] = settings.SprintF1
}

return goanalysis.NewLinter(
Expand Down
2 changes: 1 addition & 1 deletion test/testdata/perfsprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
package testdata

import (
"fmt" // want "Fix imports"
"fmt"
)

func TestPerfsprint() {
Expand Down
2 changes: 1 addition & 1 deletion test/testdata/perfsprint_custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package testdata

import (
"fmt" // want "Fix imports"
"fmt"
)

func TestPerfsprint2() {
Expand Down

0 comments on commit a990dfe

Please sign in to comment.