Skip to content

Commit ce9bbe3

Browse files
build(deps): bump github.com/nunnatsa/ginkgolinter from 0.16.2 to 0.17.0 (#5093)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent c2f7126 commit ce9bbe3

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ require (
8282
github.com/nakabonne/nestif v0.3.1
8383
github.com/nishanths/exhaustive v0.12.0
8484
github.com/nishanths/predeclared v0.2.2
85-
github.com/nunnatsa/ginkgolinter v0.16.2
85+
github.com/nunnatsa/ginkgolinter v0.17.0
8686
github.com/pelletier/go-toml/v2 v2.2.3
8787
github.com/polyfloyd/go-errorlint v1.6.0
8888
github.com/quasilyte/go-ruleguard/dsl v0.3.22
@@ -190,7 +190,7 @@ require (
190190
go.uber.org/atomic v1.7.0 // indirect
191191
go.uber.org/multierr v1.6.0 // indirect
192192
go.uber.org/zap v1.24.0 // indirect
193-
golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect
193+
golang.org/x/exp/typeparams v0.0.0-20240909161429-701f63a606c0 // indirect
194194
golang.org/x/mod v0.21.0 // indirect
195195
golang.org/x/sync v0.8.0 // indirect
196196
golang.org/x/sys v0.26.0 // indirect

go.sum

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

pkg/golinters/ginkgolinter/ginkgolinter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ func New(settings *config.GinkgoLinterSettings) *goanalysis.Linter {
2323
SuppressTypeCompare: types.Boolean(settings.SuppressTypeCompareWarning),
2424
AllowHaveLen0: types.Boolean(settings.AllowHaveLenZero),
2525
ForceExpectTo: types.Boolean(settings.ForceExpectTo),
26-
ValidateAsyncIntervals: types.Boolean(settings.ForbidSpecPollution),
27-
ForbidSpecPollution: types.Boolean(settings.ValidateAsyncIntervals),
26+
ValidateAsyncIntervals: types.Boolean(settings.ValidateAsyncIntervals),
27+
ForbidSpecPollution: types.Boolean(settings.ForbidSpecPollution),
2828
}
2929
}
3030

pkg/golinters/ginkgolinter/testdata/ginkgolinter_suppress_compare.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ func WrongComparisonUsecase_compare() {
6464
x := 8
6565
Expect(x == 8).To(BeTrue())
6666
Expect(x < 9).To(BeTrue())
67-
Expect(x < 7).To(Equal(false))
67+
Expect(x < 7).To(Equal(false)) // want "ginkgo-linter: wrong boolean assertion. Consider using `Expect\\(x < 7\\)\\.To\\(BeFalse\\(\\)\\)`"
6868

6969
p1, p2 := &x, &x
70-
Expect(p1 == p2).To(Equal(true))
70+
Expect(p1 == p2).To(Equal(true)) // want "ginkgo-linter: wrong boolean assertion. Consider using `Expect\\(p1 == p2\\)\\.To\\(BeTrue\\(\\)\\)`"
7171
}
7272

7373
func slowInt_compare() int {

pkg/golinters/ginkgolinter/testdata/ginkgolinter_suppress_err.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ func ErrorUsecase_err() {
4949
funcReturnsErr := func() error { return err }
5050

5151
Expect(err).To(BeNil())
52-
Expect(err == nil).To(Equal(true))
53-
Expect(err == nil).To(BeFalse())
54-
Expect(err != nil).To(BeTrue())
52+
Expect(err == nil).To(Equal(true)) // want "ginkgo-linter: wrong nil assertion. Consider using `Expect\\(err\\).To\\(BeNil\\(\\)\\)`"
53+
Expect(err == nil).To(BeFalse()) // want "ginkgo-linter: wrong nil assertion. Consider using `Expect\\(err\\).ToNot\\(BeNil\\(\\)\\)`"
54+
Expect(err != nil).To(BeTrue()) // want "ginkgo-linter: wrong nil assertion. Consider using `Expect\\(err\\).ToNot\\(BeNil\\(\\)\\)`"
5555
Expect(funcReturnsErr()).To(BeNil())
5656
}
5757

pkg/golinters/ginkgolinter/testdata/ginkgolinter_suppress_nil.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ func LenUsecase_nil() {
3131
func NilUsecase_nil() {
3232
y := 5
3333
x := &y
34-
Expect(x == nil).To(Equal(true))
35-
Expect(nil == x).To(Equal(true))
36-
Expect(x != nil).To(Equal(true))
34+
Expect(x == nil).To(Equal(true)) // want "ginkgo-linter: wrong boolean assertion. Consider using `Expect\\(x == nil\\).To\\(BeTrue\\(\\)\\)`"
35+
Expect(nil == x).To(Equal(true)) // want "ginkgo-linter: wrong boolean assertion. Consider using `Expect\\(nil == x\\).To\\(BeTrue\\(\\)\\)`"
36+
Expect(x != nil).To(Equal(true)) // want "ginkgo-linter: wrong boolean assertion. Consider using `Expect\\(x != nil\\).To\\(BeTrue\\(\\)\\)`"
3737
Expect(x == nil).To(BeTrue())
3838
Expect(x == nil).To(BeFalse())
3939
}

0 commit comments

Comments
 (0)