aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/tomarrell
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2024-09-10 12:16:33 +0200
committerTaras Madan <tarasmadan@google.com>2024-09-10 14:05:26 +0000
commitc97c816133b42257d0bcf1ee4bd178bb2a7a2b9e (patch)
tree0bcbc2e540bbf8f62f6c17887cdd53b8c2cee637 /vendor/github.com/tomarrell
parent54e657429ab892ad06c90cd7c1a4eb33ba93a3dc (diff)
vendor: update
Diffstat (limited to 'vendor/github.com/tomarrell')
-rw-r--r--vendor/github.com/tomarrell/wrapcheck/v2/wrapcheck/wrapcheck.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/tomarrell/wrapcheck/v2/wrapcheck/wrapcheck.go b/vendor/github.com/tomarrell/wrapcheck/v2/wrapcheck/wrapcheck.go
index 79e7bba86..2c1b2d20b 100644
--- a/vendor/github.com/tomarrell/wrapcheck/v2/wrapcheck/wrapcheck.go
+++ b/vendor/github.com/tomarrell/wrapcheck/v2/wrapcheck/wrapcheck.go
@@ -283,9 +283,9 @@ func reportUnwrapped(
}
// Check if the underlying type of the "x" in x.y.z is an interface, as
- // errors returned from interface types should be wrapped, unless ignored
- // as per `ignoreInterfaceRegexps`
- if isInterface(pass, sel) {
+ // errors returned from exported interface types should be wrapped, unless
+ // ignored as per `ignoreInterfaceRegexps`
+ if sel.Sel.IsExported() && isInterface(pass, sel) {
pkgPath := pass.TypesInfo.ObjectOf(sel.Sel).Pkg().Path()
name := types.TypeString(pass.TypesInfo.TypeOf(sel.X), func(p *types.Package) string { return p.Name() })
if !containsMatch(regexpsInter, name) && !containsMatchGlob(pkgGlobs, pkgPath) {