Skip to content

fyodorvi/depcheck-junit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

depcheck-junit

CircleCI npm

Junit output for depcheck utility, handy for CI.

Install

npm i -g depcheck-junit

Usage

All you need to do - pipe or depcheck json result into depcheck-junit:

depcheck --json | depcheck-junit

Output:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
  <testsuite name="depcheck" tests="3" failures="3" errors="0" skipped="0">
    <testcase classname="package.json" name="Unused dependency: request">
      <failure/>
    </testcase>
    <testcase classname="package.json" name="Unused devDependency: lodash">
      <failure/>
    </testcase>
    <testcase classname="package.json" name="Missing dependency: moment">
      <failure/>
    </testcase>
  </testsuite>
</testsuites>

Optionally, you may specify className (by default, package.json):

depcheck --json | depcheck-junit --className my-module/package.json
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
  <testsuite name="depcheck" tests="3" failures="3" errors="0" skipped="0">
    <testcase classname="my-module/package.json" name="Unused dependency: request">
      <failure/>
    </testcase>
    <testcase classname="my-module/package.json" name="Unused devDependency: lodash">
      <failure/>
    </testcase>
    <testcase classname="my-module/package.json" name="Missing dependency: moment">
      <failure/>
    </testcase>
  </testsuite>
</testsuites>

The app will exit with non-zero code if there was a depcheck issue (handy for CI).

About

Junit output for depcheck

Resources

Stars

Watchers

Forks

Packages

No packages published