Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue: panic when using custom matchers #126

Merged
merged 1 commit into from
Dec 20, 2023
Merged

Fix issue: panic when using custom matchers #126

merged 1 commit into from
Dec 20, 2023

Conversation

nunnatsa
Copy link
Owner

@nunnatsa nunnatsa commented Dec 20, 2023

Description

custom matchers that are defined in other packages, and get no parameters, cause panic, ans they wrongly treated as the MatchError matcher.

Custom matchers that are defined in other packages, and get some parameters, may cause false positive for wrong usage of MatchError matcher.

This PR fixes this issue.

Fixes #124

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

  • Added test case and related test data
  • Update the functional test

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I ran golangci-lint

@nunnatsa

custom matchers that are defined in other packages, cause false positive
in the MatchError check.
Copy link

Pull Request Test Coverage Report for Build 7272279591

  • 19 of 21 (90.48%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 84.786%

Changes Missing Coverage Covered Lines Changed/Added Lines %
ginkgo_linter.go 19 21 90.48%
Totals Coverage Status
Change from base Build 7244526420: 0.3%
Covered Lines: 1109
Relevant Lines: 1308

💛 - Coveralls

@nunnatsa nunnatsa merged commit 29b4d3f into main Dec 20, 2023
1 check passed
@nunnatsa nunnatsa deleted the fix-124 branch December 20, 2023 07:32
@nunnatsa nunnatsa changed the title Fix issue with custom matcher Fix issue: panic when using custom matchers Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Panic during checkMatchErrorAssertion with -fix
1 participant