build(deps): bump github.com/jgautheron/goconst from 1.6.0 to 1.7.0 (#4200)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
parent
be5c2e930d
commit
53e2c534e2
@ -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'.
|
||||
|
2
go.mod
2
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
|
||||
|
4
go.sum
generated
4
go.sum
generated
@ -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=
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user