From 53e2c534e216b9e9421246330fb9905f60d69cf5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 16:05:53 +0100 Subject: [PATCH] build(deps): bump github.com/jgautheron/goconst from 1.6.0 to 1.7.0 (#4200) Co-authored-by: Fernandez Ludovic --- .golangci.reference.yml | 3 +++ go.mod | 2 +- go.sum | 4 ++-- pkg/config/linters_settings.go | 17 +++++++++-------- pkg/golinters/goconst.go | 1 + 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.golangci.reference.yml b/.golangci.reference.yml index a4fbc025..878597c3 100644 --- a/.golangci.reference.yml +++ b/.golangci.reference.yml @@ -503,6 +503,9 @@ linters-settings: # Ignore when constant is not used as function argument. # Default: true ignore-calls: false + # Exclude strings matching the given regular expression. + # Default: "" + ignore-strings: 'foo.+' gocritic: # Which checks should be enabled; can't be combined with 'disabled-checks'. diff --git a/go.mod b/go.mod index 4a11cce0..9fbe0c54 100644 --- a/go.mod +++ b/go.mod @@ -55,7 +55,7 @@ require ( github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-version v1.6.0 github.com/hexops/gotextdiff v1.0.3 - github.com/jgautheron/goconst v1.6.0 + github.com/jgautheron/goconst v1.7.0 github.com/jingyugao/rowserrcheck v1.1.1 github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af github.com/julz/importas v0.1.0 diff --git a/go.sum b/go.sum index 1865cd1b..ffd1136e 100644 --- a/go.sum +++ b/go.sum @@ -308,8 +308,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jgautheron/goconst v1.6.0 h1:gbMLWKRMkzAc6kYsQL6/TxaoBUg3Jm9LSF/Ih1ADWGA= -github.com/jgautheron/goconst v1.6.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jgautheron/goconst v1.7.0 h1:cEqH+YBKLsECnRSd4F4TK5ri8t/aXtt/qoL0Ft252B0= +github.com/jgautheron/goconst v1.7.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= diff --git a/pkg/config/linters_settings.go b/pkg/config/linters_settings.go index 768d82df..5f85059b 100644 --- a/pkg/config/linters_settings.go +++ b/pkg/config/linters_settings.go @@ -438,14 +438,15 @@ type GocognitSettings struct { } type GoConstSettings struct { - IgnoreTests bool `mapstructure:"ignore-tests"` - MatchWithConstants bool `mapstructure:"match-constant"` - MinStringLen int `mapstructure:"min-len"` - MinOccurrencesCount int `mapstructure:"min-occurrences"` - ParseNumbers bool `mapstructure:"numbers"` - NumberMin int `mapstructure:"min"` - NumberMax int `mapstructure:"max"` - IgnoreCalls bool `mapstructure:"ignore-calls"` + IgnoreStrings string `mapstructure:"ignore-strings"` + IgnoreTests bool `mapstructure:"ignore-tests"` + MatchWithConstants bool `mapstructure:"match-constant"` + MinStringLen int `mapstructure:"min-len"` + MinOccurrencesCount int `mapstructure:"min-occurrences"` + ParseNumbers bool `mapstructure:"numbers"` + NumberMin int `mapstructure:"min"` + NumberMax int `mapstructure:"max"` + IgnoreCalls bool `mapstructure:"ignore-calls"` } type GoCriticSettings struct { diff --git a/pkg/golinters/goconst.go b/pkg/golinters/goconst.go index e277509d..b5188527 100644 --- a/pkg/golinters/goconst.go +++ b/pkg/golinters/goconst.go @@ -53,6 +53,7 @@ func NewGoconst(settings *config.GoConstSettings) *goanalysis.Linter { func runGoconst(pass *analysis.Pass, settings *config.GoConstSettings) ([]goanalysis.Issue, error) { cfg := goconstAPI.Config{ + IgnoreStrings: settings.IgnoreStrings, IgnoreTests: settings.IgnoreTests, MatchWithConstants: settings.MatchWithConstants, MinStringLength: settings.MinStringLen,