File tree Expand file tree Collapse file tree 6 files changed +16
-16
lines changed
pkg/golinters/ginkgolinter Expand file tree Collapse file tree 6 files changed +16
-16
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
7373func slowInt_compare () int {
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -31,9 +31,9 @@ func LenUsecase_nil() {
3131func 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}
You can’t perform that action at this time.
0 commit comments