Skip to content

Commit 6c295e4

Browse files
hn8ldez
andauthored
deps: Update Wrapcheck to v2.3.0 (#2145)
* Update Wrapcheck to v2.3 Updat ignoreSigs default, add ignorePackageGlobs * Update .golangci.example.yml Co-authored-by: Ludovic Fernandez <[email protected]> Co-authored-by: Ludovic Fernandez <[email protected]>
1 parent 54bfadb commit 6c295e4

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

.golangci.example.yml

+5
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,11 @@ linters-settings:
616616
- .Wrap(
617617
- .Wrapf(
618618
- .WithMessage(
619+
- .WithMessagef(
620+
- .WithStack(
621+
ignorePackageGlobs:
622+
- encoding/*
623+
- github.com/pkg/*
619624

620625
wsl:
621626
# See https://github.com/bombsimon/wsl/blob/master/doc/configuration.md for

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ require (
7777
github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b
7878
github.com/tetafro/godot v1.4.8
7979
github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94
80-
github.com/tomarrell/wrapcheck/v2 v2.2.0
80+
github.com/tomarrell/wrapcheck/v2 v2.3.0
8181
github.com/tommy-muehle/go-mnd/v2 v2.4.0
8282
github.com/ultraware/funlen v0.0.3
8383
github.com/ultraware/whitespace v0.0.4

go.sum

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/config/linters_settings.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ type WhitespaceSettings struct {
462462
}
463463

464464
type WrapcheckSettings struct {
465-
IgnoreSigs []string `mapstructure:"ignoreSigs"`
465+
IgnoreSigs []string `mapstructure:"ignoreSigs"`
466+
IgnorePackageGlobs []string `mapstructure:"ignorePackageGlobs"`
466467
}
467468

468469
type WSLSettings struct {

pkg/golinters/wrapcheck.go

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ func NewWrapcheck(settings *config.WrapcheckSettings) *goanalysis.Linter {
1616
if len(settings.IgnoreSigs) != 0 {
1717
cfg.IgnoreSigs = settings.IgnoreSigs
1818
}
19+
if len(settings.IgnorePackageGlobs) != 0 {
20+
cfg.IgnorePackageGlobs = settings.IgnorePackageGlobs
21+
}
1922
}
2023

2124
a := wrapcheck.NewAnalyzer(cfg)

0 commit comments

Comments
 (0)