nunnatsa / ginkgolinter

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

New rule(s): Wrong Usage of the `MatchError` gomega Matcher #118

Closed nunnatsa closed 8 months ago

nunnatsa commented 8 months ago

Description

The MatchError gomega matcher asserts an error value (and if it's not nil).

There are four valid formats for using this Matcher:

These four format are checked on runtime, but sometimes it's too late. ginkgolinter performs a static analysis and so it will find these issues on build time.

ginkgolinter checks the following:

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:

Fix #114

github-actions[bot] commented 8 months ago

Pull Request Test Coverage Report for Build 6811556342


Changes Missing Coverage Covered Lines Changed/Added Lines %
ginkgo_linter.go 88 95 92.63%
<!-- Total: 89 96 92.71% -->
Totals Coverage Status
Change from base Build 6681659461: 0.5%
Covered Lines: 1102
Relevant Lines: 1305

💛 - Coveralls