build(deps): bump github.com/nunnatsa/ginkgolinter from 0.13.5 to 0.14.0 (#4117)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2023-10-09 09:04:59 +02:00 committed by GitHub
parent dd58dd5223
commit 0e82ef5b32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 17 deletions

View File

@ -456,6 +456,10 @@ linters-settings:
# Default: false # Default: false
suppress-async-assertion: true suppress-async-assertion: true
# Suppress warning for comparing values from different types, like int32 and uint32
# Default: false
suppress-type-compare-assertion: true
# Trigger warning for ginkgo focus containers like FDescribe, FContext, FWhen or FIt # Trigger warning for ginkgo focus containers like FDescribe, FContext, FWhen or FIt
# Default: false # Default: false
forbid-focus-container: true forbid-focus-container: true

2
go.mod
View File

@ -77,7 +77,7 @@ require (
github.com/nakabonne/nestif v0.3.1 github.com/nakabonne/nestif v0.3.1
github.com/nishanths/exhaustive v0.11.0 github.com/nishanths/exhaustive v0.11.0
github.com/nishanths/predeclared v0.2.2 github.com/nishanths/predeclared v0.2.2
github.com/nunnatsa/ginkgolinter v0.13.5 github.com/nunnatsa/ginkgolinter v0.14.0
github.com/polyfloyd/go-errorlint v1.4.5 github.com/polyfloyd/go-errorlint v1.4.5
github.com/quasilyte/go-ruleguard/dsl v0.3.22 github.com/quasilyte/go-ruleguard/dsl v0.3.22
github.com/ryancurrah/gomodguard v1.3.0 github.com/ryancurrah/gomodguard v1.3.0

4
go.sum generated
View File

@ -392,8 +392,8 @@ github.com/nishanths/exhaustive v0.11.0 h1:T3I8nUGhl/Cwu5Z2hfc92l0e04D2GEW6e0l8p
github.com/nishanths/exhaustive v0.11.0/go.mod h1:RqwDsZ1xY0dNdqHho2z6X+bgzizwbLYOWnZbbl2wLB4= github.com/nishanths/exhaustive v0.11.0/go.mod h1:RqwDsZ1xY0dNdqHho2z6X+bgzizwbLYOWnZbbl2wLB4=
github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk=
github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c=
github.com/nunnatsa/ginkgolinter v0.13.5 h1:fOsPB4CEZOPkyMqF4B9hoqOpooFWU7vWSVkCSscVpgU= github.com/nunnatsa/ginkgolinter v0.14.0 h1:XQPNmw+kZz5cC/HbFK3mQutpjzAQv1dHregRA+4CGGg=
github.com/nunnatsa/ginkgolinter v0.13.5/go.mod h1:OBHy4536xtuX3102NM63XRtOyxqZOO02chsaeDWXVO8= github.com/nunnatsa/ginkgolinter v0.14.0/go.mod h1:cm2xaqCUCRd7qcP4DqbVvpcyEMkuLM9CF0wY6VASohk=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU=

View File

@ -394,13 +394,14 @@ type GciSettings struct {
} }
type GinkgoLinterSettings struct { type GinkgoLinterSettings struct {
SuppressLenAssertion bool `mapstructure:"suppress-len-assertion"` SuppressLenAssertion bool `mapstructure:"suppress-len-assertion"`
SuppressNilAssertion bool `mapstructure:"suppress-nil-assertion"` SuppressNilAssertion bool `mapstructure:"suppress-nil-assertion"`
SuppressErrAssertion bool `mapstructure:"suppress-err-assertion"` SuppressErrAssertion bool `mapstructure:"suppress-err-assertion"`
SuppressCompareAssertion bool `mapstructure:"suppress-compare-assertion"` SuppressCompareAssertion bool `mapstructure:"suppress-compare-assertion"`
SuppressAsyncAssertion bool `mapstructure:"suppress-async-assertion"` SuppressAsyncAssertion bool `mapstructure:"suppress-async-assertion"`
ForbidFocusContainer bool `mapstructure:"forbid-focus-container"` SuppressTypeCompareWarning bool `mapstructure:"suppress-type-compare-assertion"`
AllowHaveLenZero bool `mapstructure:"allow-havelen-zero"` ForbidFocusContainer bool `mapstructure:"forbid-focus-container"`
AllowHaveLenZero bool `mapstructure:"allow-havelen-zero"`
} }
type GocognitSettings struct { type GocognitSettings struct {

View File

@ -14,13 +14,14 @@ func NewGinkgoLinter(cfg *config.GinkgoLinterSettings) *goanalysis.Linter {
cfgMap := make(map[string]map[string]any) cfgMap := make(map[string]map[string]any)
if cfg != nil { if cfg != nil {
cfgMap[a.Name] = map[string]any{ cfgMap[a.Name] = map[string]any{
"suppress-len-assertion": cfg.SuppressLenAssertion, "suppress-len-assertion": cfg.SuppressLenAssertion,
"suppress-nil-assertion": cfg.SuppressNilAssertion, "suppress-nil-assertion": cfg.SuppressNilAssertion,
"suppress-err-assertion": cfg.SuppressErrAssertion, "suppress-err-assertion": cfg.SuppressErrAssertion,
"suppress-compare-assertion": cfg.SuppressCompareAssertion, "suppress-compare-assertion": cfg.SuppressCompareAssertion,
"suppress-async-assertion": cfg.SuppressAsyncAssertion, "suppress-async-assertion": cfg.SuppressAsyncAssertion,
"forbid-focus-container": cfg.ForbidFocusContainer, "suppress-type-compare-assertion": cfg.SuppressTypeCompareWarning,
"allow-havelen-0": cfg.AllowHaveLenZero, "forbid-focus-container": cfg.ForbidFocusContainer,
"allow-havelen-0": cfg.AllowHaveLenZero,
} }
} }