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