Skip to content

Commit

Permalink
build(deps): bump github.com/nunnatsa/ginkgolinter from 0.16.2 to 0.1…
Browse files Browse the repository at this point in the history
…7.0 (#5093)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and ldez authored Oct 29, 2024
1 parent c2f7126 commit ce9bbe3
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ require (
github.com/nakabonne/nestif v0.3.1
github.com/nishanths/exhaustive v0.12.0
github.com/nishanths/predeclared v0.2.2
github.com/nunnatsa/ginkgolinter v0.16.2
github.com/nunnatsa/ginkgolinter v0.17.0
github.com/pelletier/go-toml/v2 v2.2.3
github.com/polyfloyd/go-errorlint v1.6.0
github.com/quasilyte/go-ruleguard/dsl v0.3.22
Expand Down Expand Up @@ -190,7 +190,7 @@ require (
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect
golang.org/x/exp/typeparams v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.26.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum

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

4 changes: 2 additions & 2 deletions pkg/golinters/ginkgolinter/ginkgolinter.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ func New(settings *config.GinkgoLinterSettings) *goanalysis.Linter {
SuppressTypeCompare: types.Boolean(settings.SuppressTypeCompareWarning),
AllowHaveLen0: types.Boolean(settings.AllowHaveLenZero),
ForceExpectTo: types.Boolean(settings.ForceExpectTo),
ValidateAsyncIntervals: types.Boolean(settings.ForbidSpecPollution),
ForbidSpecPollution: types.Boolean(settings.ValidateAsyncIntervals),
ValidateAsyncIntervals: types.Boolean(settings.ValidateAsyncIntervals),
ForbidSpecPollution: types.Boolean(settings.ForbidSpecPollution),
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ func WrongComparisonUsecase_compare() {
x := 8
Expect(x == 8).To(BeTrue())
Expect(x < 9).To(BeTrue())
Expect(x < 7).To(Equal(false))
Expect(x < 7).To(Equal(false)) // want "ginkgo-linter: wrong boolean assertion. Consider using `Expect\\(x < 7\\)\\.To\\(BeFalse\\(\\)\\)`"

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

func slowInt_compare() int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ func ErrorUsecase_err() {
funcReturnsErr := func() error { return err }

Expect(err).To(BeNil())
Expect(err == nil).To(Equal(true))
Expect(err == nil).To(BeFalse())
Expect(err != nil).To(BeTrue())
Expect(err == nil).To(Equal(true)) // want "ginkgo-linter: wrong nil assertion. Consider using `Expect\\(err\\).To\\(BeNil\\(\\)\\)`"
Expect(err == nil).To(BeFalse()) // want "ginkgo-linter: wrong nil assertion. Consider using `Expect\\(err\\).ToNot\\(BeNil\\(\\)\\)`"
Expect(err != nil).To(BeTrue()) // want "ginkgo-linter: wrong nil assertion. Consider using `Expect\\(err\\).ToNot\\(BeNil\\(\\)\\)`"
Expect(funcReturnsErr()).To(BeNil())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func LenUsecase_nil() {
func NilUsecase_nil() {
y := 5
x := &y
Expect(x == nil).To(Equal(true))
Expect(nil == x).To(Equal(true))
Expect(x != nil).To(Equal(true))
Expect(x == nil).To(Equal(true)) // want "ginkgo-linter: wrong boolean assertion. Consider using `Expect\\(x == nil\\).To\\(BeTrue\\(\\)\\)`"
Expect(nil == x).To(Equal(true)) // want "ginkgo-linter: wrong boolean assertion. Consider using `Expect\\(nil == x\\).To\\(BeTrue\\(\\)\\)`"
Expect(x != nil).To(Equal(true)) // want "ginkgo-linter: wrong boolean assertion. Consider using `Expect\\(x != nil\\).To\\(BeTrue\\(\\)\\)`"
Expect(x == nil).To(BeTrue())
Expect(x == nil).To(BeFalse())
}
Expand Down

0 comments on commit ce9bbe3

Please # to comment.