feat(coverage): add statements to lcov
reports
#7146
Merged
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.
Motivation
To improve
lcov
coverage reports, by addingDA
for statements.closes #6968
Solution
I did a little bit of digging for this one, my first guess was an error with the visitor implementation but it was not the case, it looks like
statement
s are omitted while generatinglcov
reports. I am not sure about the reason but there is comment that says statement's are not compatible withlcov
. I am not very familiar with lcov so not sure about the next statement but, I feel like addingDA
to lcov report for statements should work.foundry/crates/forge/src/coverage.rs
Lines 119 to 120 in e897bd6
By changing it to emit
DA
values I obtained following coverage report for the project reported: