-
Notifications
You must be signed in to change notification settings - Fork 91
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
MATLAB coverage.xml with abstract classes cannot be read #304
Comments
I can do a pull request for either of the two solutions named above. I would like to discuss though what you consider the best option before starting. |
@fschwaiger Thanks for creating a ticket for this issue! Mostly likely you will need to submit a fix to one of the many parsers we support (some sadly are not very widely supported or maintained). https://github.com/ryanluker/vscode-coverage-gutters/blob/master/src/files/coverageparser.ts#L37-L46 Another option we have planned is to bring more of this parsing "in-house" by having the extension also do that work. #224 (comment) Supported LCOV parsers |
I see, thank you for making me aware that this is within a dependency, I should have considered that. It definitely makes more sense to fix it there: https://github.com/vokal/cobertura-parse/blob/master/source/index.js I will create an issue there and update here when done. |
@ryanluker I just saw that the dependency https://github.com/vokal/cobertura-parse is archived and quite outdated. However it appear the following fork has attempted a fix: qingguo-yu/cobertura-parse@4cb916d |
@fschwaiger Great find! I would swap out the version we have installed here with the forked one to see if the build passes and the issue is fixed 🤔 . |
Summary
Upgrade cobertura to use a none archived library
Work
Original Ticket
Describe the bug
MATLAB has an option to generate code coverage reports in standard XML format. However, for abstract interface classes, there can be blocks that have no testable lines of code. The report generator will then produce empty
<lines/>
nodes:This behaviour is not anticipated by this extension. Following the stack trace (sorry, I don't have it at hand currently) leads to the following code snippet in this extension's JS, where the existence of
c.methods[ 0 ].method[ x ].lines[ 0 ].line[ 0 ]
is assumed:To Reproduce
Steps to reproduce the behaviour:
<lines/>
nodeExpected behaviour
The file should be loadable. I have not yet figured out what the correct value for missing lines would be. We could either check right before extracting the line number and return
0
orNAN
:or filter out methods that have no lines in a preliminary
filter()
step:Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: