Closed pohly closed 1 year ago
Is your feature request related to a problem? Please describe.
This is sub-optimal:
gomega.Expect(batchLag <= podBatchStartupLimit).To(gomega.BeTrue(), "Batch creation startup time exceed limit")
Describe the solution you'd like
The linter should detect this and suggest:
gomega.Expect(batchLag).To(gomega.BeNumerically("<=", podBatchStartupLimit), "Batch creation startup time exceed limit")
Additional context
With the original Expect it is not clear which value is the actual value. I would just keep the order of the comparison operands.
Expect
This is just one example - there could be plenty of variants of this, including those with To(gomega.BeFalse()) or even worse, ToNot(gomega.BeFalse()). Test developers are creative...
To(gomega.BeFalse())
ToNot(gomega.BeFalse())
Is your feature request related to a problem? Please describe.
This is sub-optimal:
Describe the solution you'd like
The linter should detect this and suggest:
Additional context
With the original
Expect
it is not clear which value is the actual value. I would just keep the order of the comparison operands.