nunnatsa / ginkgolinter

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

Fix issue with comparing different types and WithTransform #116

Closed nunnatsa closed 8 months ago

nunnatsa commented 8 months ago

The bug is that when checking the comparison of two different types, if the matcher is WithTransform, ginkgo linter does not check the nested matcher, causing false positive for any matcher other than Equal or BeIdentical.

This PR fixes this issue by checking the nested matcher name, and only trigger error if the nested matcher is Equal or BeIdentical.

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #115

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

github-actions[bot] commented 8 months ago

Pull Request Test Coverage Report for Build 6676045330


Totals Coverage Status
Change from base Build 6452332908: 0.09%
Covered Lines: 1022
Relevant Lines: 1218

💛 - Coveralls