wrapcheck: update configuration to include ignoreSignRegexps (#2379)
This commit is contained in:
parent
55358972d6
commit
a5f0a4d861
@ -762,9 +762,11 @@ linters-settings:
|
||||
- .WithMessage(
|
||||
- .WithMessagef(
|
||||
- .WithStack(
|
||||
ignoreSigRegexps:
|
||||
- \.New.*Error\(
|
||||
ignorePackageGlobs:
|
||||
- encoding/*
|
||||
- github.com/pkg/*
|
||||
- encoding/*
|
||||
- github.com/pkg/*
|
||||
|
||||
wsl:
|
||||
# See https://github.com/bombsimon/wsl/blob/master/doc/configuration.md for
|
||||
|
@ -525,6 +525,7 @@ type WhitespaceSettings struct {
|
||||
|
||||
type WrapcheckSettings struct {
|
||||
IgnoreSigs []string `mapstructure:"ignoreSigs"`
|
||||
IgnoreSigRegexps []string `mapstructure:"ignoreSigRegexps"`
|
||||
IgnorePackageGlobs []string `mapstructure:"ignorePackageGlobs"`
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,9 @@ func NewWrapcheck(settings *config.WrapcheckSettings) *goanalysis.Linter {
|
||||
if len(settings.IgnoreSigs) != 0 {
|
||||
cfg.IgnoreSigs = settings.IgnoreSigs
|
||||
}
|
||||
if len(settings.IgnoreSigRegexps) != 0 {
|
||||
cfg.IgnoreSigRegexps = settings.IgnoreSigRegexps
|
||||
}
|
||||
if len(settings.IgnorePackageGlobs) != 0 {
|
||||
cfg.IgnorePackageGlobs = settings.IgnorePackageGlobs
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user