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

Skip to content

Conversation

@Spacetown
Copy link
Member

As pointed out in #795 the value if no branches/lines are present must be 1.0 and not 0.0.

Closes #795

@Spacetown Spacetown added this to the Upcoming release milestone Jun 14, 2023
@codecov
Copy link

codecov bot commented Jun 14, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -1.27 ⚠️

Comparison is base (d8871de) 95.58% compared to head (07a0198) 94.31%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #796      +/-   ##
==========================================
- Coverage   95.58%   94.31%   -1.27%     
==========================================
  Files          40       40              
  Lines        4028     4028              
  Branches      789      789              
==========================================
- Hits         3850     3799      -51     
- Misses        101      149      +48     
- Partials       77       80       +3     
Impacted Files Coverage Δ
gcovr/formats/cobertura/write.py 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Spacetown Spacetown merged commit eb4332a into gcovr:master Jun 14, 2023
@Spacetown Spacetown deleted the fix_cobertura_zero_branch_rate branch June 14, 2023 20:37
@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
* Use 1.0 instead of 0.0 if `total` is 0
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.

How branch-rate can be 0.0 for simple function ?

1 participant