Skip to content

Commit 53e2c53

Browse files
build(deps): bump github.com/jgautheron/goconst from 1.6.0 to 1.7.0 (#4200)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent be5c2e9 commit 53e2c53

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

.golangci.reference.yml

+3
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,9 @@ linters-settings:
503503
# Ignore when constant is not used as function argument.
504504
# Default: true
505505
ignore-calls: false
506+
# Exclude strings matching the given regular expression.
507+
# Default: ""
508+
ignore-strings: 'foo.+'
506509

507510
gocritic:
508511
# Which checks should be enabled; can't be combined with 'disabled-checks'.

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ require (
5555
github.com/hashicorp/go-multierror v1.1.1
5656
github.com/hashicorp/go-version v1.6.0
5757
github.com/hexops/gotextdiff v1.0.3
58-
github.com/jgautheron/goconst v1.6.0
58+
github.com/jgautheron/goconst v1.7.0
5959
github.com/jingyugao/rowserrcheck v1.1.1
6060
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af
6161
github.com/julz/importas v0.1.0

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

+9-8
Original file line numberDiff line numberDiff line change
@@ -438,14 +438,15 @@ type GocognitSettings struct {
438438
}
439439

440440
type GoConstSettings struct {
441-
IgnoreTests bool `mapstructure:"ignore-tests"`
442-
MatchWithConstants bool `mapstructure:"match-constant"`
443-
MinStringLen int `mapstructure:"min-len"`
444-
MinOccurrencesCount int `mapstructure:"min-occurrences"`
445-
ParseNumbers bool `mapstructure:"numbers"`
446-
NumberMin int `mapstructure:"min"`
447-
NumberMax int `mapstructure:"max"`
448-
IgnoreCalls bool `mapstructure:"ignore-calls"`
441+
IgnoreStrings string `mapstructure:"ignore-strings"`
442+
IgnoreTests bool `mapstructure:"ignore-tests"`
443+
MatchWithConstants bool `mapstructure:"match-constant"`
444+
MinStringLen int `mapstructure:"min-len"`
445+
MinOccurrencesCount int `mapstructure:"min-occurrences"`
446+
ParseNumbers bool `mapstructure:"numbers"`
447+
NumberMin int `mapstructure:"min"`
448+
NumberMax int `mapstructure:"max"`
449+
IgnoreCalls bool `mapstructure:"ignore-calls"`
449450
}
450451

451452
type GoCriticSettings struct {

pkg/golinters/goconst.go

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ func NewGoconst(settings *config.GoConstSettings) *goanalysis.Linter {
5353

5454
func runGoconst(pass *analysis.Pass, settings *config.GoConstSettings) ([]goanalysis.Issue, error) {
5555
cfg := goconstAPI.Config{
56+
IgnoreStrings: settings.IgnoreStrings,
5657
IgnoreTests: settings.IgnoreTests,
5758
MatchWithConstants: settings.MatchWithConstants,
5859
MinStringLength: settings.MinStringLen,

0 commit comments

Comments
 (0)