Skip to content

Cobertura coverage-04.dtd support #337

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

Merged
merged 3 commits into from
Nov 5, 2018
Merged

Conversation

samssann
Copy link

Modified 'coverage' xml node to include:

  • lines-covered (number of lines where there were no hits)
  • lines-valid (number of lines of code)
  • branches-covered (covr does not calculate branching, set to 0)
  • branches-valid (covr does not calculate branching, set to 0)
  • complexity (covr does not calculate complexity, set to 0)

Further detail:

sam added 2 commits September 27, 2018 16:16
Modified 'coverage' xml node to include:
- lines-covered (number of lines where there were no hits)
- lines-valid (number of lines of code)
- branches-covered (covr does not calculate branching, set to 0)
- branches-valid (covr does not calculate branching, set to 0)
- complexity (covr does not calculate complexity, set to 0)

Further detail:
- nedbat/coveragepy#570
- https://github.com/cobertura/web/tree/master/htdocs/xml
styling editions
@CLAassistant
Copy link

CLAassistant commented Sep 27, 2018

CLA assistant check
All committers have signed the CLA.

@jimhester
Copy link
Member

What happens if these fields exist and you run with earlier versions of cobertura? Are they ignored?

@samssann
Copy link
Author

I was wondering that myself, but could not find a definitive answer so far. At least in coveragepy they've just added the new fields. Same applies to gcovr. We could of course implement

to_cobertura(cov, filename = "cobertura.xml", dtd = c("03,"04") {
  dtd <- match.arg(dtd)
  ... set fields according to dtd version ...
}

if you want to be sure. Or just ask cobertura about backwards compatibility.

@samssann
Copy link
Author

@wligtenberg #197, any insight on backwards compatibility?

@wligtenberg
Copy link
Contributor

I don't have anything that I can add. Unfortunately I do not have access to the Jenkins server I used to test this when i developed this feature.

@robertdj
Copy link

robertdj commented Nov 2, 2018

I have just implemented these additions myself (also on file and function level). They are needed for Azure DevOps to parse the Cobertura report.
Unfortunately, I cannot offer to test earlier versions, but I would love this feature here :-)

@jimhester
Copy link
Member

@samssann can you add a note to NEWS.md mentioning this change, the issue number and your GitHub username, then I can merge this.

@jimhester jimhester merged commit 278bc8b into r-lib:master Nov 5, 2018
@jimhester
Copy link
Member

Thanks!

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.

5 participants