A Go linter to check that errors from external packages are wrapped
Shifting back to Go v1.21 for the benefit of golangci-lint.
Support for Go v1.22.
Full Changelog: https://github.com/tomarrell/wrapcheck/compare/v2.8.1...v2.8.2
Bumps golang.org/x/text from 0.3.7 to 0.3.8.
The new errors.Join()
function was added in Go 1.20, it should be ignored by default.
More info in the Go 1.20 release notes: https://tip.golang.org/doc/go1.20#errors
This release introduces checking of the interface's package against the configured ignorePackageGlobs values.
Previously, only functions called directly from other packages had their packages checked against this option, however this behaviour was unintuitive. This change checks the interface package as well, ignoring interfaces which originate from a package matching a glob pattern.
Closes #34
Closes #30, updates x/tools
to latest.
This release fixes an issue when running wrapcheck over a Go v1.18 codebase due to an older version of a dependency.
This release adds the config parameter ignoreInterfaceRegexps
, which provides the ability to specify regex patterns which will ignore calls through an interface with a matching name.
For example:
ignoreInterfaceRegexps:
- [dD]ecoder
The above configuration will cause errors returned by methods called on an interface named decoder
or Decoder
to skip wrapcheck analysis.
Many thanks to @guillaumeio for the contribution!
This releases front-loads the compilation of regexps provided via the config file, enabling immediate error reporting.
It also removes the os.Exit(1)
upon failing to compile the regexps, to play nicer with golangci-lint.
This release adds the ability to configure wrapcheck to ignore signatures using regex matching using the ignoreSigRegexps
config value. Example configuration is below.
# An array of strings which specify regular expressions of signatures to ignore.
# This is similar to the ignoreSigs configuration above, but gives slightly more
# flexibility.
ignoreSigRegexps:
- \.New.*Error\(