Skip to content

Conversation

@silven
Copy link

@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.'

I also had to add missing components to the Lint job in order to get this marked green.

@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
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
Copy link
Author

silven commented Oct 6, 2025

Fixed the issue with the Lint job too.

The rustfmt and clippy components are not installed by default anymore,
so add them explicitly to the list of components to install.
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
Copy link
Author

silven commented Oct 16, 2025

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

@silven
Copy link
Author

silven commented Oct 23, 2025

Any maintainer available for input / code review?

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.

1 participant