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

forge coverage branches visualization in the LCOV report #2758

Closed
HrikB opened this issue Aug 13, 2022 · 4 comments
Closed

forge coverage branches visualization in the LCOV report #2758

HrikB opened this issue Aug 13, 2022 · 4 comments
Labels
C-forge Command: forge Cmd-forge-coverage Command: forge coverage T-feature Type: feature

Comments

@HrikB
Copy link

HrikB commented Aug 13, 2022

Component

Forge

Describe the feature you would like

When I run forge coverage --report lcov and the display the static files generated from that using genhtml -o report lcov.info, I only get visualizations for Lines and Functions:
image

Visualizations for branches would be really useful since I want to be able to cover all execution paths.

(Also I think branches is the only metric that is accurate... but I will open another issue for that)/

Additional context

No response

@HrikB HrikB added the T-feature Type: feature label Aug 13, 2022
@gakonst gakonst added this to Foundry Aug 13, 2022
@gakonst gakonst moved this to Todo in Foundry Aug 13, 2022
@rkrasiuk rkrasiuk added C-forge Command: forge Cmd-forge-coverage Command: forge coverage labels Aug 14, 2022
@onbjerg
Copy link
Member

onbjerg commented Aug 15, 2022

Use --branch-coverage on genhtml.

@onbjerg onbjerg closed this as completed Aug 15, 2022
Repository owner moved this from Todo to Done in Foundry Aug 15, 2022
@gte620v
Copy link

gte620v commented Apr 16, 2024

This no longer seems to work on lcov v2+. I upgraded lcov and the same contracts that worked on lcov 1.x now return the following error when I run genhtml with the --branch-coverage option.

abc.sol has branchcov but no linecov data

@yan-man
Copy link

yan-man commented Apr 16, 2024

getting the same issue with --branch-coverage - ABC.sol has branchcov but no linecov data, on lcov v2+ too.

on hardhat v2.17.2
node 18
hardhat-foundry 1.1.1

@DaniPopes
Copy link
Member

See #8281; fully fixed by #9438

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge Cmd-forge-coverage Command: forge coverage T-feature Type: feature
Projects
Archived in project
Development

No branches or pull requests

6 participants