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

feat(coverage): add statements to lcov reports #7146

Merged

Conversation

kayagokalp
Copy link
Contributor

Motivation

To improve lcov coverage reports, by adding DA 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 statements are omitted while generating lcov reports. I am not sure about the reason but there is comment that says statement's are not compatible with lcov. I am not very familiar with lcov so not sure about the next statement but, I feel like adding DA to lcov report for statements should work.

// Statements are not in the LCOV format
CoverageItemKind::Statement => (),

By changing it to emit DA values I obtained following coverage report for the project reported:

image

@kayagokalp
Copy link
Contributor Author

More discussion can be found in the issue tracker #6968.

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not too familiar with this, but this does lgtm

ptal @onbjerg

@onbjerg onbjerg merged commit 0cbac63 into foundry-rs:master Feb 19, 2024
19 checks passed
DaniPopes pushed a commit that referenced this pull request Feb 19, 2024
* fix: add statements to lcov reports

* chore: fmt
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.

No coverage report inside do...while loops
3 participants