File tree Expand file tree Collapse file tree 5 files changed +13
-14
lines changed Expand file tree Collapse file tree 5 files changed +13
-14
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -11,16 +11,15 @@ import (
1111func 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 (
Original file line number Diff line number Diff line change 22package testdata
33
44import (
5- "fmt" // want "Fix imports"
5+ "fmt"
66)
77
88func TestPerfsprint () {
Original file line number Diff line number Diff line change 33package testdata
44
55import (
6- "fmt" // want "Fix imports"
6+ "fmt"
77)
88
99func TestPerfsprint2 () {
You can’t perform that action at this time.
0 commit comments