Closed nunnatsa closed 9 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
types/config.go | 8 | 10 | 80.0% | ||
ginkgo_linter.go | 61 | 72 | 84.72% | ||
<!-- | Total: | 69 | 82 | 84.15% | --> |
Totals | |
---|---|
Change from base Build 6141414406: | -0.1% |
Covered Lines: | 986 |
Relevant Lines: | 1176 |
The
Equal
and theBeIdentical
matchers also check the type, not only the value.The following code will fail in runtime:
When using negative checks, it's even worse, because we get a fale positive:
To solve this problem, we want to find these errors before running the tests and failing on runtime. This is even more important for e2e or functional tests, where we sometimes can't run them on the local development environment.
This PR adds a new rule to the linter, to find comaprison of values from different types.
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 # (issue)
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:
@pohly
fixes #109