Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ linters-settings:
# Default: false
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
# Default: false
forbid-focus-container: true
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ require (
github.com/nakabonne/nestif v0.3.1
github.com/nishanths/exhaustive v0.11.0
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/quasilyte/go-ruleguard/dsl v0.3.22
github.com/ryancurrah/gomodguard v1.3.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,14 @@ type GciSettings struct {
}

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

type GocognitSettings struct {
Expand Down
15 changes: 8 additions & 7 deletions pkg/golinters/ginkgolinter.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ func NewGinkgoLinter(cfg *config.GinkgoLinterSettings) *goanalysis.Linter {
cfgMap := make(map[string]map[string]any)
if cfg != nil {
cfgMap[a.Name] = map[string]any{
"suppress-len-assertion": cfg.SuppressLenAssertion,
"suppress-nil-assertion": cfg.SuppressNilAssertion,
"suppress-err-assertion": cfg.SuppressErrAssertion,
"suppress-compare-assertion": cfg.SuppressCompareAssertion,
"suppress-async-assertion": cfg.SuppressAsyncAssertion,
"forbid-focus-container": cfg.ForbidFocusContainer,
"allow-havelen-0": cfg.AllowHaveLenZero,
"suppress-len-assertion": cfg.SuppressLenAssertion,
"suppress-nil-assertion": cfg.SuppressNilAssertion,
"suppress-err-assertion": cfg.SuppressErrAssertion,
"suppress-compare-assertion": cfg.SuppressCompareAssertion,
"suppress-async-assertion": cfg.SuppressAsyncAssertion,
"suppress-type-compare-assertion": cfg.SuppressTypeCompareWarning,
"forbid-focus-container": cfg.ForbidFocusContainer,
"allow-havelen-0": cfg.AllowHaveLenZero,
}
}

Expand Down