Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Spacetown
Copy link
Member

Use a different color in HTML report if not all branches in a line are covered.
In GitHub theme the excluded lines where green which was confusing with the covered lines in green theme.

Closes #838

@Spacetown Spacetown added this to the Upcoming release milestone Oct 11, 2023
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (8877918) 95.65% compared to head (8c9346f) 95.65%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #839   +/-   ##
=======================================
  Coverage   95.65%   95.65%           
=======================================
  Files          44       44           
  Lines        4347     4347           
  Branches      852      852           
=======================================
  Hits         4158     4158           
  Misses        111      111           
  Partials       78       78           
Files Coverage Δ
gcovr/formats/html/write.py 95.60% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RatMan64
Copy link

hey @Spacetown,
I'm a bit of a noob on this repo do I need to pull this branch for testing or just put a comment to say I saw this pr?

@Spacetown
Copy link
Member Author

You can directly install my branch with pip as described here

@Spacetown Spacetown force-pushed the html_branch_coverage_color branch from 9ea04d3 to 4842b57 Compare October 15, 2023 19:53
@Spacetown Spacetown force-pushed the html_branch_coverage_color branch from 4842b57 to 8c9346f Compare October 15, 2023 20:33
@RatMan64
Copy link

RatMan64 commented Oct 16, 2023

Hey @Spacetown I was able to test this out and looks good however, I did notice some areas of code not getting a definition of coverage.
ex.

if (c == '#' || b == '\n' || a == '\0')
{
break;
}

the break would showup as white

@RatMan64
Copy link

If this is an issue with gcovr and not this feature then Its probably OK.

@RatMan64
Copy link

Ok this looks like just a general gcovr or my code issue totally separate.

@Spacetown
Copy link
Member Author

@RatMan64 Can you add a review comment?

Copy link

@RatMan64 RatMan64 left a comment

Choose a reason for hiding this comment

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

looks good and works as expected.

@Spacetown Spacetown merged commit 737a496 into gcovr:main Oct 24, 2023
@Spacetown Spacetown deleted the html_branch_coverage_color branch October 24, 2023 19:32
@latk
Copy link
Member

latk commented Nov 5, 2023

Something went wrong with this merge? A couple of top-level directories appeared that should probably be part of the test suite?

@Spacetown
Copy link
Member Author

I'll fix this.

Spacetown added a commit to Spacetown/gcovr that referenced this pull request Nov 5, 2023
latk added a commit that referenced this pull request Nov 5, 2023
@Spacetown Spacetown removed this from the Upcoming release milestone Jan 26, 2024
D-Walther pushed a commit to D-Walther/gcovr that referenced this pull request Jun 16, 2025
* Change stylesheet to show partial coverage
D-Walther pushed a commit to D-Walther/gcovr that referenced this pull request Jun 16, 2025
D-Walther pushed a commit to D-Walther/gcovr that referenced this pull request Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Branch Summary line color based off branches traversed.

3 participants