nunnatsa / ginkgolinter

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

bug fix: false negative when comparing a pointer and an interface #79

Closed nunnatsa closed 1 year ago

nunnatsa commented 1 year ago

Description

For example, the function f()'s returned type is an interfce, but it actually returns a pointer.

The linter triggered a warning for this code:

Expect(somePointer).Eqaul(f())

But this is a actually a valid assertion.

This PR fixes this bug and does not trigger the warning the assertion compares to types.Named.

Type of change

How Has This Been Tested?

Checklist:

@nunnatsa

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4588212579


Totals Coverage Status
Change from base Build 4587746892: 0.1%
Covered Lines: 805
Relevant Lines: 955

💛 - Coveralls