Skip to content

Commit

Permalink
deps: Update Wrapcheck to v2.3.0 (#2145)
Browse files Browse the repository at this point in the history
* Update Wrapcheck to v2.3

Updat ignoreSigs default, add ignorePackageGlobs

* Update .golangci.example.yml

Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>

Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>
  • Loading branch information
hn8 and ldez committed Aug 2, 2021
1 parent 54bfadb commit 6c295e4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .golangci.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,11 @@ linters-settings:
- .Wrap(
- .Wrapf(
- .WithMessage(
- .WithMessagef(
- .WithStack(
ignorePackageGlobs:
- encoding/*
- github.com/pkg/*

wsl:
# See https://github.com/bombsimon/wsl/blob/master/doc/configuration.md for
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ require (
github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b
github.com/tetafro/godot v1.4.8
github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94
github.com/tomarrell/wrapcheck/v2 v2.2.0
github.com/tomarrell/wrapcheck/v2 v2.3.0
github.com/tommy-muehle/go-mnd/v2 v2.4.0
github.com/ultraware/funlen v0.0.3
github.com/ultraware/whitespace v0.0.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,8 @@ type WhitespaceSettings struct {
}

type WrapcheckSettings struct {
IgnoreSigs []string `mapstructure:"ignoreSigs"`
IgnoreSigs []string `mapstructure:"ignoreSigs"`
IgnorePackageGlobs []string `mapstructure:"ignorePackageGlobs"`
}

type WSLSettings struct {
Expand Down
3 changes: 3 additions & 0 deletions pkg/golinters/wrapcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ func NewWrapcheck(settings *config.WrapcheckSettings) *goanalysis.Linter {
if len(settings.IgnoreSigs) != 0 {
cfg.IgnoreSigs = settings.IgnoreSigs
}
if len(settings.IgnorePackageGlobs) != 0 {
cfg.IgnorePackageGlobs = settings.IgnorePackageGlobs
}
}

a := wrapcheck.NewAnalyzer(cfg)
Expand Down

0 comments on commit 6c295e4

Please sign in to comment.