From e7b7478c9735ec58597db236b1b958cba31f2876 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 27 Mar 2022 15:33:36 +0300 Subject: [PATCH] build(deps): bump github.com/tomarrell/wrapcheck/v2 from 2.5.0 to 2.6.0 (#2696) * build(deps): bump github.com/tomarrell/wrapcheck/v2 from 2.5.0 to 2.6.0 Bumps [github.com/tomarrell/wrapcheck/v2](https://github.com/tomarrell/wrapcheck) from 2.5.0 to 2.6.0. - [Release notes](https://github.com/tomarrell/wrapcheck/releases) - [Commits](https://github.com/tomarrell/wrapcheck/compare/v2.5.0...v2.6.0) --- updated-dependencies: - dependency-name: github.com/tomarrell/wrapcheck/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * add new option Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Fernandez Ludovic --- .golangci.example.yml | 2 ++ go.mod | 2 +- go.sum | 4 ++-- pkg/config/linters_settings.go | 8 +++++--- pkg/golinters/wrapcheck.go | 3 +++ 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.golangci.example.yml b/.golangci.example.yml index 4f4c1e52042c..dd6e40e01dbe 100644 --- a/.golangci.example.yml +++ b/.golangci.example.yml @@ -1555,6 +1555,8 @@ linters-settings: ignorePackageGlobs: - encoding/* - github.com/pkg/* + ignoreInterfaceRegexps: + - ^(?i)c(?-i)ach(ing|e) wsl: # See https://github.com/bombsimon/wsl/blob/master/doc/configuration.md for documentation of available settings. diff --git a/go.mod b/go.mod index 4177ca9bb23f..2f3ed1e82117 100644 --- a/go.mod +++ b/go.mod @@ -85,7 +85,7 @@ require ( github.com/tdakkota/asciicheck v0.1.1 github.com/tetafro/godot v1.4.11 github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 - github.com/tomarrell/wrapcheck/v2 v2.5.0 + github.com/tomarrell/wrapcheck/v2 v2.6.0 github.com/tommy-muehle/go-mnd/v2 v2.5.0 github.com/ultraware/funlen v0.0.3 github.com/ultraware/whitespace v0.0.5 diff --git a/go.sum b/go.sum index d097a4c2d085..0f73ca908fb6 100644 --- a/go.sum +++ b/go.sum @@ -730,8 +730,8 @@ github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcy github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck/v2 v2.5.0 h1:g27SGGHNoQdvHz4KZA9o4v09RcWzylR+b1yueE5ECiw= -github.com/tomarrell/wrapcheck/v2 v2.5.0/go.mod h1:68bQ/eJg55BROaRTbMjC7vuhL2OgfoG8bLp9ZyoBfyY= +github.com/tomarrell/wrapcheck/v2 v2.6.0 h1:xZOkQCRq3xhRqE2yuM1TbBOYaXgCIoVwUFWo5PMGv70= +github.com/tomarrell/wrapcheck/v2 v2.6.0/go.mod h1:68bQ/eJg55BROaRTbMjC7vuhL2OgfoG8bLp9ZyoBfyY= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/tommy-muehle/go-mnd/v2 v2.5.0 h1:iAj0a8e6+dXSL7Liq0aXPox36FiN1dBbjA6lt9fl65s= github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= diff --git a/pkg/config/linters_settings.go b/pkg/config/linters_settings.go index 3f984ce3724e..8f59ca5289dd 100644 --- a/pkg/config/linters_settings.go +++ b/pkg/config/linters_settings.go @@ -592,9 +592,11 @@ type WhitespaceSettings struct { } type WrapcheckSettings struct { - IgnoreSigs []string `mapstructure:"ignoreSigs"` - IgnoreSigRegexps []string `mapstructure:"ignoreSigRegexps"` - IgnorePackageGlobs []string `mapstructure:"ignorePackageGlobs"` + // TODO(ldez): v2 the options must be renamed to use hyphen. + IgnoreSigs []string `mapstructure:"ignoreSigs"` + IgnoreSigRegexps []string `mapstructure:"ignoreSigRegexps"` + IgnorePackageGlobs []string `mapstructure:"ignorePackageGlobs"` + IgnoreInterfaceRegexps []string `mapstructure:"ignoreInterfaceRegexps"` } type WSLSettings struct { diff --git a/pkg/golinters/wrapcheck.go b/pkg/golinters/wrapcheck.go index c52bcb740f42..098eb87bafc6 100644 --- a/pkg/golinters/wrapcheck.go +++ b/pkg/golinters/wrapcheck.go @@ -22,6 +22,9 @@ func NewWrapcheck(settings *config.WrapcheckSettings) *goanalysis.Linter { if len(settings.IgnorePackageGlobs) != 0 { cfg.IgnorePackageGlobs = settings.IgnorePackageGlobs } + if len(settings.IgnoreInterfaceRegexps) != 0 { + cfg.IgnoreInterfaceRegexps = settings.IgnoreInterfaceRegexps + } } a := wrapcheck.NewAnalyzer(cfg)