You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 10, 2025. It is now read-only.
diff --git a/errorlint/allowed.go b/errorlint/allowed.go
index d4274b8..faa0d61 100644
--- a/errorlint/allowed.go+++ b/errorlint/allowed.go@@ -126,6 +126,7 @@ func isAllowedErrorComparison(info *TypesInfoExt, binExpr *ast.BinaryExpr) bool
// All assignments done must be allowed.
for _, funcName := range functionNames {
if !isAllowedErrAndFunc(errName, funcName) {
+ fmt.Printf("err: %s fun: %s\n", errName, funcName)
return false
}
}
I get this result:
$ go build .
$ ./go-errorlint ./example.go err: io.EOF fun: os.Pipe/home/kir/go/src/github.com/polyfloyd/go-errorlint/example.go:13:5: comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error
So, the linter thinks err comes from os.Pipe while actually it is from (*os.File).Read.
NOTE this is not a regression in cd16050 (reproduced on both git tip as well as v1.4.3).