Closed anu-tiernan closed 1 month ago
When using clearlyip/code-coverage-report-action@v4 and the cobertura xml file does not contain any coverage data the following error is encountered:
clearlyip/code-coverage-report-action@v4
Error: Cannot destructure property '@_name' of 'undefined' as it is undefined.
Contents of an XML file that triggered the error:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd"> <coverage line-rate="NaN" branch-rate="0" version="" timestamp="1718248893625" lines-covered="0" lines-valid="0" branches-covered="0" branches-valid="0" complexity="0"> <sources></sources> <packages></packages> </coverage>
The XML was generated with https://github.com/boumenot/gocover-cobertura on a repo that did not have any unit tests, hence the empty coverage report. I'd expect the output should just indicate that there is no coverage at all.
@anu-tiernan Hi there.
I think in 5.x series this should be resolved as I ran into the same issue but let me know
When using
clearlyip/code-coverage-report-action@v4
and the cobertura xml file does not contain any coverage data the following error is encountered:Error: Cannot destructure property '@_name' of 'undefined' as it is undefined.
Contents of an XML file that triggered the error:
The XML was generated with https://github.com/boumenot/gocover-cobertura on a repo that did not have any unit tests, hence the empty coverage report. I'd expect the output should just indicate that there is no coverage at all.