fix: do not remove contract from coverage report if a function is missing statements or branches #1178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
The previous behavior expects all functions to have a report for both
statements and branches. If not, it removes the whole contract from the
coverage report.
While the assumption seems reasonable, some functions seem to only have
either one of statements or branches, ending up in removing contracts
that would otherwise contain useful coverage information.
This is related to #1087 and should at least be a partial fix to it
How I did it
Avoid excluding the contract when one of the functions in the contract was missing coverage information
How to verify it
Run the coverage report
Checklist