Skip to content
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

Invalid "cobertura" report #14

Closed
ivailop opened this issue Mar 20, 2017 · 1 comment
Closed

Invalid "cobertura" report #14

ivailop opened this issue Mar 20, 2017 · 1 comment

Comments

@ivailop
Copy link

ivailop commented Mar 20, 2017

The cobertura xml report (generated via nyc report --reporter=cobertura) appears to be invalid.
Please consider cobertura-coverage.zip.

The following snippet illustrates the problems:

<?xml version="1.0" ?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<coverage lines-valid="446" lines-covered="442" line-rate="0.991" branches-valid="278" branches-covered="264" branch-rate="0.9495999999999999" timestamp="1489774044213" complexity="0" version="0.1">
  <sources>
    <source>/home/travis/build/testspace-open/dockerfilelint</source>
  </sources>
  <packages>
    <class name="apk.js" filename="lib/apk.js" line-rate="1" branch-rate="1">
...
    </class>
  </packages>
</coverage>
  • there is a missing package tag that is supposed to be a child of the packages tag
  • there is a missing classes tag that is supposed to wrap all the class tags

Expected output:

<?xml version="1.0" ?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<coverage lines-valid="446" lines-covered="442" line-rate="0.991" branches-valid="278" branches-covered="264" branch-rate="0.9495999999999999" timestamp="1489774044213" complexity="0" version="0.1">
  <sources>
    <source>/home/travis/build/testspace-open/dockerfilelint</source>
  </sources>
  <packages>
    <package name="lib" line-rate="1" branch-rate="1">
      <classes>
        <class name="apk.js" filename="lib/apk.js" line-rate="1" branch-rate="1">
...
        </class>
      </classes>
    </package>
  </packages>
</coverage>
@bcoe
Copy link
Member

bcoe commented May 11, 2017

@ivailop I believe this should be fixed now, mind confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants