Skip to content

Commit 52793e7

Browse files
authored
build(deps): bump github.com/nunnatsa/ginkgolinter from 0.13.0 to 0.13.3 (#3972)
1 parent 0b62feb commit 52793e7

14 files changed

+40
-40
lines changed

.golangci.reference.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ linters-settings:
449449
# Default: false
450450
suppress-async-assertion: true
451451

452-
# Suppress warning for ginkgo focus containers like FDescribe, FContext, FWhen or FIt
452+
# Trigger warning for ginkgo focus containers like FDescribe, FContext, FWhen or FIt
453453
# Default: false
454-
suppress-focus-container: true
454+
forbid-focus-container: true
455455

456456
# Don't trigger warnings for HaveLen(0)
457457
# Default: false

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ require (
7777
github.com/nakabonne/nestif v0.3.1
7878
github.com/nishanths/exhaustive v0.11.0
7979
github.com/nishanths/predeclared v0.2.2
80-
github.com/nunnatsa/ginkgolinter v0.13.0
80+
github.com/nunnatsa/ginkgolinter v0.13.3
8181
github.com/polyfloyd/go-errorlint v1.4.3
8282
github.com/quasilyte/go-ruleguard/dsl v0.3.22
8383
github.com/ryancurrah/gomodguard v1.3.0

go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/config/linters_settings.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ type GinkgoLinterSettings struct {
396396
SuppressErrAssertion bool `mapstructure:"suppress-err-assertion"`
397397
SuppressCompareAssertion bool `mapstructure:"suppress-compare-assertion"`
398398
SuppressAsyncAssertion bool `mapstructure:"suppress-async-assertion"`
399-
SuppressFocusContainer bool `mapstructure:"suppress-focus-container"`
399+
ForbidFocusContainer bool `mapstructure:"forbid-focus-container"`
400400
AllowHaveLenZero bool `mapstructure:"allow-havelen-zero"`
401401
}
402402

pkg/golinters/ginkgolinter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func NewGinkgoLinter(cfg *config.GinkgoLinterSettings) *goanalysis.Linter {
1919
"suppress-err-assertion": cfg.SuppressErrAssertion,
2020
"suppress-compare-assertion": cfg.SuppressCompareAssertion,
2121
"suppress-async-assertion": cfg.SuppressAsyncAssertion,
22-
"suppress-focus-container": cfg.SuppressFocusContainer,
22+
"forbid-focus-container": cfg.ForbidFocusContainer,
2323
"allow-havelen-0": cfg.AllowHaveLenZero,
2424
}
2525
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
linters-settings:
22
ginkgolinter:
3-
suppress-focus-container: true
3+
forbid-focus-container: true

test/testdata/ginkgolinter/ginkgolinter.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ func WrongEventuallyWithFunction() {
7878
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"
7979
}
8080

81-
var _ = Describe("Should warn for focused containers", func() {
82-
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\""
83-
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\""
84-
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\""
81+
var _ = FDescribe("Should warn for focused containers", func() {
82+
FContext("should not allow FContext", func() {
83+
FWhen("should not allow FWhen", func() {
84+
FIt("should not allow FIt", func() {})
8585
})
8686
})
8787
})

test/testdata/ginkgolinter/ginkgolinter_havelen0.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ func WrongEventuallyWithFunction_havelen0() {
7979
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"
8080
}
8181

82-
var _ = Describe("Should warn for focused containers", func() {
83-
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\""
84-
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\""
85-
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\""
82+
var _ = FDescribe("Should warn for focused containers", func() {
83+
FContext("should not allow FContext", func() {
84+
FWhen("should not allow FWhen", func() {
85+
FIt("should not allow FIt", func() {})
8686
})
8787
})
8888
})

test/testdata/ginkgolinter/ginkgolinter_suppress_async.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ func WrongEventuallyWithFunction_async() {
8080
Eventually(slowInt_async()).Should(Equal(42)) // suppressed
8181
}
8282

83-
var _ = Describe("Should warn for focused containers", func() {
84-
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\""
85-
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\""
86-
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\""
83+
var _ = FDescribe("Should warn for focused containers", func() {
84+
FContext("should not allow FContext", func() {
85+
FWhen("should not allow FWhen", func() {
86+
FIt("should not allow FIt", func() {})
8787
})
8888
})
8989
})

test/testdata/ginkgolinter/ginkgolinter_suppress_compare.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ func WrongEventuallyWithFunction_compare() {
8080
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"
8181
}
8282

83-
var _ = Describe("Should warn for focused containers", func() {
84-
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\""
85-
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\""
86-
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\""
83+
var _ = FDescribe("Should warn for focused containers", func() {
84+
FContext("should not allow FContext", func() {
85+
FWhen("should not allow FWhen", func() {
86+
FIt("should not allow FIt", func() {})
8787
})
8888
})
8989
})

test/testdata/ginkgolinter/ginkgolinter_suppress_err.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ func WrongEventuallyWithFunction_err() {
8080
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"
8181
}
8282

83-
var _ = Describe("Should warn for focused containers", func() {
84-
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\""
85-
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\""
86-
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\""
83+
var _ = FDescribe("Should warn for focused containers", func() {
84+
FContext("should not allow FContext", func() {
85+
FWhen("should not allow FWhen", func() {
86+
FIt("should not allow FIt", func() {})
8787
})
8888
})
8989
})

test/testdata/ginkgolinter/ginkgolinter_suppress_focused_containers.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ func WrongEventuallyWithFunction_focus() {
7979
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"
8080
}
8181

82-
var _ = FDescribe("Should warn for focused containers", func() {
83-
FContext("should not allow FContext", func() {
84-
FWhen("should not allow FWhen", func() {
85-
FIt("should not allow FIt", func() {
82+
var _ = Describe("Should warn for focused containers", func() {
83+
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\""
84+
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\""
85+
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\""
8686

8787
})
8888
})

test/testdata/ginkgolinter/ginkgolinter_suppress_len.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ func WrongEventuallyWithFunction_len() {
8080
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"
8181
}
8282

83-
var _ = Describe("Should warn for focused containers", func() {
84-
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\""
85-
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\""
86-
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\""
83+
var _ = FDescribe("Should warn for focused containers", func() {
84+
FContext("should not allow FContext", func() {
85+
FWhen("should not allow FWhen", func() {
86+
FIt("should not allow FIt", func() {})
8787
})
8888
})
8989
})

test/testdata/ginkgolinter/ginkgolinter_suppress_nil.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ func WrongEventuallyWithFunction_nil() {
8080
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"
8181
}
8282

83-
var _ = Describe("Should warn for focused containers", func() {
84-
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\""
85-
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\""
86-
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\""
83+
var _ = FDescribe("Should warn for focused containers", func() {
84+
FContext("should not allow FContext", func() {
85+
FWhen("should not allow FWhen", func() {
86+
FIt("should not allow FIt", func() {})
8787
})
8888
})
8989
})

0 commit comments

Comments
 (0)