From f0dbc757c87366ff13658fb2087eec1e996df65f Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 26 Feb 2023 14:59:25 +0100
Subject: [PATCH] build(deps): bump github.com/polyfloyd/go-errorlint from
 1.1.0 to 1.2.0 (#3636)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
---
 .golangci.reference.yml        |  3 +++
 go.mod                         |  2 +-
 go.sum                         |  4 ++--
 pkg/config/linters_settings.go | 14 ++++++++------
 pkg/golinters/errorlint.go     |  7 ++++---
 5 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/.golangci.reference.yml b/.golangci.reference.yml
index 7de210b9..241fb7fe 100644
--- a/.golangci.reference.yml
+++ b/.golangci.reference.yml
@@ -294,6 +294,9 @@ linters-settings:
     # See the https://github.com/polyfloyd/go-errorlint for caveats.
     # Default: true
     errorf: false
+    # Permit more than 1 %w verb, valid per Go 1.20 (Requires errorf:true)
+    # Default: true
+    errorf-multi: false
     # Check for plain type assertions and type switches.
     # Default: true
     asserts: false
diff --git a/go.mod b/go.mod
index 46c4921b..3bae316d 100644
--- a/go.mod
+++ b/go.mod
@@ -75,7 +75,7 @@ require (
 	github.com/nishanths/exhaustive v0.9.5
 	github.com/nishanths/predeclared v0.2.2
 	github.com/nunnatsa/ginkgolinter v0.8.1
-	github.com/polyfloyd/go-errorlint v1.1.0
+	github.com/polyfloyd/go-errorlint v1.2.0
 	github.com/quasilyte/go-ruleguard/dsl v0.3.22
 	github.com/ryancurrah/gomodguard v1.3.0
 	github.com/ryanrolds/sqlclosecheck v0.4.0
diff --git a/go.sum b/go.sum
index d0c476f9..9096ff56 100644
--- a/go.sum
+++ b/go.sum
@@ -412,8 +412,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
 github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/polyfloyd/go-errorlint v1.1.0 h1:VKoEFg5yxSgJ2yFPVhxW7oGz+f8/OVcuMeNvcPIi6Eg=
-github.com/polyfloyd/go-errorlint v1.1.0/go.mod h1:Uss7Bc/izYG0leCMRx3WVlrpqWedSZk7V/FUQW6VJ6U=
+github.com/polyfloyd/go-errorlint v1.2.0 h1:d+f5Xh4ppX2ndg0DzkjXqqd127NgDb/SyRgYTisCHAQ=
+github.com/polyfloyd/go-errorlint v1.2.0/go.mod h1:Uss7Bc/izYG0leCMRx3WVlrpqWedSZk7V/FUQW6VJ6U=
 github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
 github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
 github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
diff --git a/pkg/config/linters_settings.go b/pkg/config/linters_settings.go
index d76eaacc..fb805f02 100644
--- a/pkg/config/linters_settings.go
+++ b/pkg/config/linters_settings.go
@@ -19,9 +19,10 @@ var defaultLintersSettings = LintersSettings{
 		MaxBlankIdentifiers: 2,
 	},
 	ErrorLint: ErrorLintSettings{
-		Errorf:     true,
-		Asserts:    true,
-		Comparison: true,
+		Errorf:      true,
+		ErrorfMulti: true,
+		Asserts:     true,
+		Comparison:  true,
 	},
 	Exhaustive: ExhaustiveSettings{
 		Check:                      []string{"switch"},
@@ -280,9 +281,10 @@ type ErrChkJSONSettings struct {
 }
 
 type ErrorLintSettings struct {
-	Errorf     bool `mapstructure:"errorf"`
-	Asserts    bool `mapstructure:"asserts"`
-	Comparison bool `mapstructure:"comparison"`
+	Errorf      bool `mapstructure:"errorf"`
+	ErrorfMulti bool `mapstructure:"errorf-multi"`
+	Asserts     bool `mapstructure:"asserts"`
+	Comparison  bool `mapstructure:"comparison"`
 }
 
 type ExhaustiveSettings struct {
diff --git a/pkg/golinters/errorlint.go b/pkg/golinters/errorlint.go
index dd9d9016..36c976a5 100644
--- a/pkg/golinters/errorlint.go
+++ b/pkg/golinters/errorlint.go
@@ -15,9 +15,10 @@ func NewErrorLint(cfg *config.ErrorLintSettings) *goanalysis.Linter {
 
 	if cfg != nil {
 		cfgMap[a.Name] = map[string]interface{}{
-			"errorf":     cfg.Errorf,
-			"asserts":    cfg.Asserts,
-			"comparison": cfg.Comparison,
+			"errorf":       cfg.Errorf,
+			"errorf-multi": cfg.ErrorfMulti,
+			"asserts":      cfg.Asserts,
+			"comparison":   cfg.Comparison,
 		}
 	}