Skip to content

build(deps): bump github.com/nunnatsa/ginkgolinter from 0.13.0 to 0.13.3 #3972

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

Merged
merged 1 commit into from
Jul 25, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ linters-settings:
# Default: false
suppress-async-assertion: true

# Suppress 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
suppress-focus-container: true
forbid-focus-container: true

# Don't trigger warnings for HaveLen(0)
# Default: false
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.0
github.com/nunnatsa/ginkgolinter v0.13.3
github.com/polyfloyd/go-errorlint v1.4.3
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.

2 changes: 1 addition & 1 deletion pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ type GinkgoLinterSettings struct {
SuppressErrAssertion bool `mapstructure:"suppress-err-assertion"`
SuppressCompareAssertion bool `mapstructure:"suppress-compare-assertion"`
SuppressAsyncAssertion bool `mapstructure:"suppress-async-assertion"`
SuppressFocusContainer bool `mapstructure:"suppress-focus-container"`
ForbidFocusContainer bool `mapstructure:"forbid-focus-container"`
AllowHaveLenZero bool `mapstructure:"allow-havelen-zero"`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/golinters/ginkgolinter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func NewGinkgoLinter(cfg *config.GinkgoLinterSettings) *goanalysis.Linter {
"suppress-err-assertion": cfg.SuppressErrAssertion,
"suppress-compare-assertion": cfg.SuppressCompareAssertion,
"suppress-async-assertion": cfg.SuppressAsyncAssertion,
"suppress-focus-container": cfg.SuppressFocusContainer,
"forbid-focus-container": cfg.ForbidFocusContainer,
"allow-havelen-0": cfg.AllowHaveLenZero,
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
linters-settings:
ginkgolinter:
suppress-focus-container: true
forbid-focus-container: true
8 changes: 4 additions & 4 deletions test/testdata/ginkgolinter/ginkgolinter.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ func WrongEventuallyWithFunction() {
Eventually(slowInt()).Should(Equal(42)) // want "ginkgo-linter: use a function call in Eventually. This actually checks nothing, because Eventually receives the function returned value, instead of function itself, and this value is never changed; consider using .Eventually\\(slowInt\\)\\.Should\\(Equal\\(42\\)\\). instead"
}

var _ = Describe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"Context\""
FWhen("should not allow FWhen", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"When\""
FIt("should not allow FIt", func() {}) // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"It\""
var _ = FDescribe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() {
FWhen("should not allow FWhen", func() {
FIt("should not allow FIt", func() {})
})
})
})
8 changes: 4 additions & 4 deletions test/testdata/ginkgolinter/ginkgolinter_havelen0.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ func WrongEventuallyWithFunction_havelen0() {
Eventually(slowInt_havelen0()).Should(Equal(42)) // want "ginkgo-linter: use a function call in Eventually. This actually checks nothing, because Eventually receives the function returned value, instead of function itself, and this value is never changed; consider using .Eventually\\(slowInt_havelen0\\)\\.Should\\(Equal\\(42\\)\\). instead"
}

var _ = Describe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"Context\""
FWhen("should not allow FWhen", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"When\""
FIt("should not allow FIt", func() {}) // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"It\""
var _ = FDescribe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() {
FWhen("should not allow FWhen", func() {
FIt("should not allow FIt", func() {})
})
})
})
8 changes: 4 additions & 4 deletions test/testdata/ginkgolinter/ginkgolinter_suppress_async.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ func WrongEventuallyWithFunction_async() {
Eventually(slowInt_async()).Should(Equal(42)) // suppressed
}

var _ = Describe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"Context\""
FWhen("should not allow FWhen", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"When\""
FIt("should not allow FIt", func() {}) // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"It\""
var _ = FDescribe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() {
FWhen("should not allow FWhen", func() {
FIt("should not allow FIt", func() {})
})
})
})
8 changes: 4 additions & 4 deletions test/testdata/ginkgolinter/ginkgolinter_suppress_compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ func WrongEventuallyWithFunction_compare() {
Eventually(slowInt_compare()).Should(Equal(42)) // want "ginkgo-linter: use a function call in Eventually. This actually checks nothing, because Eventually receives the function returned value, instead of function itself, and this value is never changed; consider using .Eventually\\(slowInt_compare\\)\\.Should\\(Equal\\(42\\)\\). instead"
}

var _ = Describe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"Context\""
FWhen("should not allow FWhen", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"When\""
FIt("should not allow FIt", func() {}) // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"It\""
var _ = FDescribe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() {
FWhen("should not allow FWhen", func() {
FIt("should not allow FIt", func() {})
})
})
})
8 changes: 4 additions & 4 deletions test/testdata/ginkgolinter/ginkgolinter_suppress_err.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ func WrongEventuallyWithFunction_err() {
Eventually(slowInt_err()).Should(Equal(42)) // want "ginkgo-linter: use a function call in Eventually. This actually checks nothing, because Eventually receives the function returned value, instead of function itself, and this value is never changed; consider using .Eventually\\(slowInt_err\\)\\.Should\\(Equal\\(42\\)\\). instead"
}

var _ = Describe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"Context\""
FWhen("should not allow FWhen", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"When\""
FIt("should not allow FIt", func() {}) // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"It\""
var _ = FDescribe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() {
FWhen("should not allow FWhen", func() {
FIt("should not allow FIt", func() {})
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ func WrongEventuallyWithFunction_focus() {
Eventually(slowInt_focus()).Should(Equal(42)) // want "ginkgo-linter: use a function call in Eventually. This actually checks nothing, because Eventually receives the function returned value, instead of function itself, and this value is never changed; consider using .Eventually\\(slowInt_focus\\)\\.Should\\(Equal\\(42\\)\\). instead"
}

var _ = FDescribe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() {
FWhen("should not allow FWhen", func() {
FIt("should not allow FIt", func() {
var _ = Describe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"Context\""
FWhen("should not allow FWhen", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"When\""
FIt("should not allow FIt", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"It\""

})
})
Expand Down
8 changes: 4 additions & 4 deletions test/testdata/ginkgolinter/ginkgolinter_suppress_len.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ func WrongEventuallyWithFunction_len() {
Eventually(slowInt_len()).Should(Equal(42)) // want "ginkgo-linter: use a function call in Eventually. This actually checks nothing, because Eventually receives the function returned value, instead of function itself, and this value is never changed; consider using .Eventually\\(slowInt_len\\)\\.Should\\(Equal\\(42\\)\\). instead"
}

var _ = Describe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"Context\""
FWhen("should not allow FWhen", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"When\""
FIt("should not allow FIt", func() {}) // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"It\""
var _ = FDescribe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() {
FWhen("should not allow FWhen", func() {
FIt("should not allow FIt", func() {})
})
})
})
8 changes: 4 additions & 4 deletions test/testdata/ginkgolinter/ginkgolinter_suppress_nil.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ func WrongEventuallyWithFunction_nil() {
Eventually(slowInt_nil()).Should(Equal(42)) // want "ginkgo-linter: use a function call in Eventually. This actually checks nothing, because Eventually receives the function returned value, instead of function itself, and this value is never changed; consider using .Eventually\\(slowInt_nil\\)\\.Should\\(Equal\\(42\\)\\). instead"
}

var _ = Describe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"Context\""
FWhen("should not allow FWhen", func() { // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"When\""
FIt("should not allow FIt", func() {}) // want "ginkgo-linter: Focus container found. This is used only for local debug and should not be part of the actual source code, consider to replace with \"It\""
var _ = FDescribe("Should warn for focused containers", func() {
FContext("should not allow FContext", func() {
FWhen("should not allow FWhen", func() {
FIt("should not allow FIt", func() {})
})
})
})