nunnatsa / ginkgolinter

golang linter for ginkgo and gomega
MIT License
24 stars 6 forks source link

New Rule: cap assertion #138

Closed nunnatsa closed 3 months ago

nunnatsa commented 3 months ago

Description

Trigger warnings for directly assert the builtin cap function.

For example:

Expect(cap(slice)).To(Equal(10)) ==> Expect(slice).To(HaveCap(10))
Expect(cap(slice) == 10).To(BeTrue()) ==> Expect(slice).To(HaveCap(10))

Type of change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist:

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 8280717642

Details


Totals Coverage Status
Change from base Build 8227609747: 0.0%
Covered Lines: 200
Relevant Lines: 299

💛 - Coveralls