From d092c7148e92cad9a6057eae8315ec3b111067a7 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Fri, 2 Feb 2024 22:41:22 +0100 Subject: [PATCH] chore: update implementation --- pkg/golinters/perfsprint.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkg/golinters/perfsprint.go b/pkg/golinters/perfsprint.go index a74fd9fa69a0..acaa3a522547 100644 --- a/pkg/golinters/perfsprint.go +++ b/pkg/golinters/perfsprint.go @@ -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(