[JSLint report watcher] Parsing errors

JSLint report watcher fails to parse the xml reports due to parse errors (it can see the files).
This is an example of the output:

<testsuites><testsuite failures='1' time='0.038' skipped='0' errors='1' tests='1' name='/Users/dev-admin/Downloads/TeamCity/buildAgent/work/6878009ee5c1ff98/src/application/control/AdPrepareModelCommand.js'><testcase time='0.038' classname='com.googlecode.jslint4java' name='/Users/dev-admin/Downloads/TeamCity/buildAgent/work/6878009ee5c1ff98/src/application/control/AdPrepareModelCommand.js'><failure message='Found 2 problems' type='java.lang.AssertionError'>/Users/dev-admin/Downloads/TeamCity/buildAgent/work/6878009ee5c1ff98/src/application/control/AdPrepareModelCommand.js:22:52:'AdModelProxy' was used before it was defined.
/Users/dev-admin/Downloads/TeamCity/buildAgent/work/6878009ee5c1ff98/src/application/control/AdPrepareModelCommand.js:23:23:'AdConfig' was used before it was defined.
</failure></testcase></testsuite></testsuites>



I'm on Mac (10.7.3) with TeamCity 7.0.2a and using jslint4java-2.0.2.jar

This is the ant task:

<jslint haltOnFailure="false" options="undef,white">
<formatter type="plain" />
<formatter type="junit" destfile="${report.dir}/jslint-test-reports" />
<fileset dir="${src.dir}" includes="**/*.js" />
</jslint>



This is from the build.log
JSLint report watcher
[14:48:11][JSLint report watcher] 26 reports found for paths:
[14:48:11][JSLint report watcher] report/jslint-test-reports/*.xml
[14:48:11][JSLint report watcher] Parsing errors
[14:48:11][Parsing errors] Failed to parse 26 reports


Any ideas on how I can try to fix this?


Peter
2 comments
Comment actions Permalink

Hello, Peter,

JSLint report watcher is designed to process custom XML format for jslint4java.
To generate XML reports of that type use <formatter type="xml"...

You may also use <formatter type="checkstyle"... and set Report type:  Checkstyle in TeamCity

See details at http://docs.jslint4java.googlecode.com/git/2.0.1/ant.html

0
Comment actions Permalink

Thanks! Have nice reporting now!

0

Please sign in to leave a comment.