ryanluker / vscode-coverage-gutters

Display test coverage generated by lcov and xml - works with many languages
https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
MIT License
460 stars 88 forks source link

Support cobertura xml format with npm cobertura-parse #96

Closed hendrics closed 6 years ago

hendrics commented 6 years ago

Hi @ryanluker

Do you think it would be easy to add cobertura support using https://www.npmjs.com/package/cobertura-parse which should be compatible with lcov-parse?

I would like to use it with pytest and python which does not support lcov parser, but i am sure other tools might benefit from this integration.

Thank you!

ryanluker commented 6 years ago

hey @hendrics , thanks for submitting this issue and doing a bit of research into a solution! Looks definitely doable to add another adaptor to the lcov-parse then it would use xml or lcov based coverage based on which files were found. I will put this issue into the next release (1.2.0) and maybe tinkering with a solution today a bit.

hendrics commented 6 years ago

Thank you for the quick response! and even more amazing that you've already given it a go!

ryanluker commented 6 years ago

No problem! I do most of my open source contributions on the weekend so you caught me at a good time for some tinkering 😄 . I may have a few questions for you later once i get xml working but otherwise i think another weekend at the latest to get this done.

ryanluker commented 6 years ago

@hendrics getting close to finishing this issue #97. There is a few bits though that will not work with the 1.2.0 release. For example the partial coverage relied on the branches section of the coverage report but the cobertura parse extension did not implement that specific piece of functionality. The html coverage reports, full line coverage support, file watching and multi coverage file selector will work though! Hoping to get a few more bits done early this week and have a mid week release.

221017-1

ryanluker commented 6 years ago

@hendrics doing some final testing with a linux desktop but otherwise 1.2.0 should go out shortly! https://github.com/ryanluker/vscode-coverage-gutters/releases/tag/v1.2.0 thanks for submitting this issue, hope you enjoy the xml support.

hendrics commented 6 years ago

@ryanluker thank you for this. I've only just managed to get some time to try it. Unfortunately, it seems not be working well for me. I see some gutters but only on a few lines at the top of the file and not at the other places. I see in the xml files that there should be more lines but they are not being displayed... i might be doing something wrong. I do not have time to create a small, reproducible example, unfortunately. I'll try to do this when i have a few spare cycles, maybe over xmas period.