nunnatsa / ginkgolinter

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

Resolves #151: mark incorrect usages of Succeed() #152

Open navijation opened 3 months ago

navijation commented 3 months ago

Description

Fixes #151. Add a new, partially suppressible error set for calls to Succeed.

Whenever the actual argument is not a single error value for synchronous calls, or not a function returning a single error value for asynchronous calls, this creates a non-suppressible error.

Whenever the actual argument is anything but a function call, e.g. Expect(err).To(Succeed()), this creates a suppressible error that can be suppressed with command line flags or comment directives, and suggests a replacement to Expect(err).To(HaveOccurred()).

Type of change

Please delete options that are not relevant.

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:

@nunnatsa

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9542355837

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
types/config.go 5 7 71.43%
<!-- Total: 6 8 75.0% -->
Totals Coverage Status
Change from base Build 9516146313: 0.1%
Covered Lines: 213
Relevant Lines: 330

💛 - Coveralls
coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9639348734

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
types/config.go 5 7 71.43%
<!-- Total: 7 9 77.78% -->
Totals Coverage Status
Change from base Build 9516146313: 0.3%
Covered Lines: 214
Relevant Lines: 331

💛 - Coveralls
nunnatsa commented 3 months ago

@navijation - would you mind to change the commits, so they will include only changes from main, and not from each other? For example, if a commit added some code that was later modified or removed, please use the final version of the change in the commit. we have now 14 commits in this PR, and I think we can do that with 4-5 commits.

For a specific example, the "fix bug" commit should be rebased with the commit that added the code before the fix.

navijation commented 3 months ago

@nunnatsa I've rebased as 4 commits to the best of my ability. Although I would probably recommend squash merging this PR since the boundaries are a little blurry between each commit after merging them.

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9739311110

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
types/config.go 5 7 71.43%
<!-- Total: 7 9 77.78% -->
Totals Coverage Status
Change from base Build 9516146313: 0.3%
Covered Lines: 214
Relevant Lines: 331

💛 - Coveralls