From a27a1dfdb315f681c6e431df9b8a7847079f566d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 28 Mar 2025 23:33:11 +0000
Subject: [PATCH 1/3] build(deps): bump github.com/tomarrell/wrapcheck/v2

Bumps [github.com/tomarrell/wrapcheck/v2](https://github.com/tomarrell/wrapcheck) from 2.10.0 to 2.11.0.
- [Release notes](https://github.com/tomarrell/wrapcheck/releases)
- [Commits](https://github.com/tomarrell/wrapcheck/compare/v2.10.0...v2.11.0)

---
updated-dependencies:
- dependency-name: github.com/tomarrell/wrapcheck/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 go.mod | 4 +++-
 go.sum | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/go.mod b/go.mod
index 423c12939046..dbb3dbced444 100644
--- a/go.mod
+++ b/go.mod
@@ -2,6 +2,8 @@ module github.com/golangci/golangci-lint/v2
 
 go 1.23.0
 
+toolchain go1.24.1
+
 require (
 	4d63.com/gocheckcompilerdirectives v1.3.0
 	4d63.com/gochecknoglobals v0.2.2
@@ -111,7 +113,7 @@ require (
 	github.com/tetafro/godot v1.5.0
 	github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67
 	github.com/timonwong/loggercheck v0.10.1
-	github.com/tomarrell/wrapcheck/v2 v2.10.0
+	github.com/tomarrell/wrapcheck/v2 v2.11.0
 	github.com/tommy-muehle/go-mnd/v2 v2.5.1
 	github.com/ultraware/funlen v0.2.0
 	github.com/ultraware/whitespace v0.2.0
diff --git a/go.sum b/go.sum
index 3d633f4b3ffa..f3d3371ad890 100644
--- a/go.sum
+++ b/go.sum
@@ -583,8 +583,8 @@ github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFA
 github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
 github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
 github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
-github.com/tomarrell/wrapcheck/v2 v2.10.0 h1:SzRCryzy4IrAH7bVGG4cK40tNUhmVmMDuJujy4XwYDg=
-github.com/tomarrell/wrapcheck/v2 v2.10.0/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo=
+github.com/tomarrell/wrapcheck/v2 v2.11.0 h1:BJSt36snX9+4WTIXeJ7nvHBQBcm1h2SjQMSlmQ6aFSU=
+github.com/tomarrell/wrapcheck/v2 v2.11.0/go.mod h1:wFL9pDWDAbXhhPZZt+nG8Fu+h29TtnZ2MW6Lx4BRXIU=
 github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw=
 github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw=
 github.com/ultraware/funlen v0.2.0 h1:gCHmCn+d2/1SemTdYMiKLAHFYxTYz7z9VIDRaTGyLkI=

From 2e7575d77cf95cc9ee4699dfc3816064bcc310b4 Mon Sep 17 00:00:00 2001
From: Fernandez Ludovic <ldez@users.noreply.github.com>
Date: Sat, 29 Mar 2025 00:45:01 +0100
Subject: [PATCH 2/3] chore: update implementation

---
 .golangci.next.reference.yml             | 3 +++
 jsonschema/golangci.next.jsonschema.json | 5 +++++
 pkg/config/linters_settings.go           | 1 +
 pkg/golinters/wrapcheck/wrapcheck.go     | 2 ++
 4 files changed, 11 insertions(+)

diff --git a/.golangci.next.reference.yml b/.golangci.next.reference.yml
index 81d741134a69..548166540f4c 100644
--- a/.golangci.next.reference.yml
+++ b/.golangci.next.reference.yml
@@ -3758,6 +3758,9 @@ linters:
       # Default: []
       ignore-interface-regexps:
         - ^(?i)c(?-i)ach(ing|e)
+      # Determines whether wrapcheck should report errors returned from inside the package.
+      # Default: false
+      report-internal-errors: true
 
     wsl:
       # Do strict checking when assigning from append (x = append(x, y)).
diff --git a/jsonschema/golangci.next.jsonschema.json b/jsonschema/golangci.next.jsonschema.json
index 776a489afd98..58a29dcacfa5 100644
--- a/jsonschema/golangci.next.jsonschema.json
+++ b/jsonschema/golangci.next.jsonschema.json
@@ -3934,6 +3934,11 @@
               "items": {
                 "type": "string"
               }
+            },
+            "report-internal-errors": {
+              "description": "determines whether wrapcheck should report errors returned from inside the package.",
+              "type": "boolean",
+              "default": false
             }
           }
         },
diff --git a/pkg/config/linters_settings.go b/pkg/config/linters_settings.go
index 86ee4fea48d2..45109fe4b088 100644
--- a/pkg/config/linters_settings.go
+++ b/pkg/config/linters_settings.go
@@ -965,6 +965,7 @@ type WrapcheckSettings struct {
 	IgnoreSigRegexps       []string `mapstructure:"ignore-sig-regexps"`
 	IgnorePackageGlobs     []string `mapstructure:"ignore-package-globs"`
 	IgnoreInterfaceRegexps []string `mapstructure:"ignore-interface-regexps"`
+	ReportInternalErrors   bool     `mapstructure:"report-internal-errors"`
 }
 
 type WSLSettings struct {
diff --git a/pkg/golinters/wrapcheck/wrapcheck.go b/pkg/golinters/wrapcheck/wrapcheck.go
index 8918a82eaf1a..8a4427f7d368 100644
--- a/pkg/golinters/wrapcheck/wrapcheck.go
+++ b/pkg/golinters/wrapcheck/wrapcheck.go
@@ -10,8 +10,10 @@ import (
 
 func New(settings *config.WrapcheckSettings) *goanalysis.Linter {
 	cfg := wrapcheck.NewDefaultConfig()
+
 	if settings != nil {
 		cfg.ExtraIgnoreSigs = settings.ExtraIgnoreSigs
+		cfg.ReportInternalErrors = settings.ReportInternalErrors
 
 		if len(settings.IgnoreSigs) != 0 {
 			cfg.IgnoreSigs = settings.IgnoreSigs

From cc58ae08b5da6c45f1dc9a923b43da8078f7a776 Mon Sep 17 00:00:00 2001
From: Fernandez Ludovic <ldez@users.noreply.github.com>
Date: Sat, 29 Mar 2025 13:11:12 +0100
Subject: [PATCH 3/3] chore: clean

---
 go.mod                                   | 2 --
 jsonschema/golangci.next.jsonschema.json | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/go.mod b/go.mod
index dbb3dbced444..970e5a2f9294 100644
--- a/go.mod
+++ b/go.mod
@@ -2,8 +2,6 @@ module github.com/golangci/golangci-lint/v2
 
 go 1.23.0
 
-toolchain go1.24.1
-
 require (
 	4d63.com/gocheckcompilerdirectives v1.3.0
 	4d63.com/gochecknoglobals v0.2.2
diff --git a/jsonschema/golangci.next.jsonschema.json b/jsonschema/golangci.next.jsonschema.json
index 58a29dcacfa5..e768900991ca 100644
--- a/jsonschema/golangci.next.jsonschema.json
+++ b/jsonschema/golangci.next.jsonschema.json
@@ -3936,7 +3936,7 @@
               }
             },
             "report-internal-errors": {
-              "description": "determines whether wrapcheck should report errors returned from inside the package.",
+              "description": "Determines whether wrapcheck should report errors returned from inside the package.",
               "type": "boolean",
               "default": false
             }