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

Highlight covered lines green in html report #86

Closed
Warwolt opened this issue Aug 31, 2021 · 2 comments
Closed

Highlight covered lines green in html report #86

Warwolt opened this issue Aug 31, 2021 · 2 comments
Labels
C-question Category: A question

Comments

@Warwolt
Copy link

Warwolt commented Aug 31, 2021

First of all, really nice project! I got it installed and running in my Windows environment with zero hassle. 👏

I've only used gcov in C++ based projects before, and so I've only seen that classical blocky html report. Gcov seems to render covered lines in green, and non-covered lines in red, in their html reports. As far as I can tell for the rust code that I've tested cargo-llvm-cov with, I'm only getting red lines.

image
image

Is it possible for cargo-llvm-cov to generate html reports that contain these green lines? Or does it already and I'm just perhaps having a config issue?

@taiki-e taiki-e added the C-question Category: A question label Dec 28, 2021
@taiki-e
Copy link
Owner

taiki-e commented Jan 18, 2022

I think this is because llvm-cov supports region coverage and branch coverage. (Note: It's llvm-cov that actually provides the functionality to generate the report, and cargo-llvm-cov just calls it with the appropriate flags.)

codecov and others represent partial coverage as a yellow line, but it's not clear which regions are not covered. The following is an example of llvm-cov region coverage.

llvm-cov

Also, if you want to see a line-style coverage report locally, I guess you can use lcov's html report (cargo-llvm-cov supports the lcov format).

@taiki-e
Copy link
Owner

taiki-e commented Jun 26, 2023

FYI, I believe that by using llvm-cov-pretty together, you will get the report with the design you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-question Category: A question
Projects
None yet
Development

No branches or pull requests

2 participants