tomarrell / wrapcheck

A Go linter to check that errors from external packages are wrapped
https://blog.tomarrell.com/post/introducing_wrapcheck_linter_for_go
MIT License
302 stars 27 forks source link

feat: ignore Go 1.20 errors.Join() sig by default #37

Closed jacalvo closed 1 year ago

jacalvo commented 1 year ago

After upgrading to Go 1.20 and using the new errors.Join() from the standard library, there is a false positive from wrapcheck saying that error returned from external package is unwrapped, when errors.Join() is now supposed to be an idiomatic way to wrap multiple errors from external packages.

More info in the Go 1.20 release notes:

https://tip.golang.org/doc/go1.20#errors

tomarrell commented 1 year ago

LGTM, thanks!