Skip to content

Conversation

@silven
Copy link
Contributor

@silven silven commented Oct 3, 2025

Some parsers require the presence of the condition-coverage field on the line elements in the report. This change adds and populates this field based on the available Conditions data.

See: https://github.com/cobertura/cobertura/blob/master/cobertura/src/site/htdocs/xml/coverage-03.dtd

Implements / Addresses #1029

I don't know if this is entirely correct, but it is accepted by our SonarQube setup at least.

@silven silven force-pushed the silven/cobertura branch 2 times, most recently from fcd10f9 to 6d22c48 Compare October 3, 2025 11:35
@silven
Copy link
Contributor Author

silven commented Oct 3, 2025

Interesting side note I learned about when investigating this. Since GCC 14, there is actual support for condition coverage - but it involves a new version of the gcov file format, which grcov doesn't support.

@silven

This comment was marked as outdated.

@silven silven force-pushed the silven/cobertura branch 2 times, most recently from 6d0d1ea to a610f8d Compare October 6, 2025 18:47
@silven

This comment was marked as outdated.

@silven silven force-pushed the silven/cobertura branch 2 times, most recently from b661e7d to 3d15f5a Compare October 7, 2025 11:46
@silven
Copy link
Contributor Author

silven commented Oct 16, 2025

Sorry for the repeated ping @marco-c, any thoughts on this?

@silven
Copy link
Contributor Author

silven commented Oct 23, 2025

Any maintainer available for input / code review?

@silven silven force-pushed the silven/cobertura branch 3 times, most recently from 581eb0e to 118bfe8 Compare November 7, 2025 12:54
@silven silven requested a review from marco-c November 7, 2025 13:30
Some parsers require the presence of the `condition-coverage` field
on the `line` elements in the report. This change adds and populates
this field based on the available `Conditions` data.

See: https://github.com/cobertura/cobertura/blob/master/cobertura/src/site/htdocs/xml/coverage-03.dtd

Implements mozilla#1029
@silven silven requested a review from marco-c November 10, 2025 20:36
@marco-c marco-c merged commit dcc769c into mozilla:master Nov 14, 2025
10 checks passed
@marco-c
Copy link
Collaborator

marco-c commented Nov 14, 2025

Thanks!

@silven silven deleted the silven/cobertura branch November 17, 2025 10:11
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.

2 participants