Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-26682

Can't parse jslint-formatted XML file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • warnings-plugin
    • None
    • Warning Plugin 4.35

      Hi everyone,

      I spent few hours on that issue yesterday afternoon and this morning, without any solutions .

      I have a freestyle job that will generate a JSLint XML report thanks to the ESLint Quality tool. (pwd and ls are just debugging )

      npm install
      ./node_modules/bower/bin/bower install
      node ./node_modules/eslint/bin/eslint --config config/eslint.json --rulesdir config/rules --format jslint-xml -o lint.xml --quiet app/javascript || true 
      pwd
      ls
      

      I have configured the Warning Plugin to parse the lint.xml file with the JSLint parser. When I run my Job, here is the output :

      [testworkflowgrunt-ci-1] $ /bin/bash -xe /tmp/hudson3519419950863763056.sh
      + npm install
      npm WARN package.json tutoGruntWorkflow@1.0.0 No repository field.
      + ./node_modules/bower/bin/bower install
      + node ./node_modules/eslint/bin/eslint --config config/eslint.json --rulesdir config/rules --format jslint-xml -o lint.xml --quiet app/javascript
      + true
      + pwd
      /DATA/jenkins/workspace/testworkflowgrunt-ci-1
      + ls
      app
      bower.json
      checkstyle.xml
      config
      grunt
      Gruntfile.js
      jslint.xml
      lint.xml
      node_modules
      package.json
      README.md
      [WARNINGS] Parsing warnings in files 'lint.xml' with parser JSLint
      [WARNINGS] Finding all files that match the pattern lint.xml
      [WARNINGS] Parsing 1 files in /DATA/jenkins/workspace/testworkflowgrunt-ci-1
      [WARNINGS] Parsing of file /DATA/jenkins/workspace/testworkflowgrunt-ci-1/lint.xml failed due to an exception:
      
      java.io.IOException: Underlying input stream returned zero bytes
      	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:287)
      	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
      	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
      	at java.io.InputStreamReader.read(InputStreamReader.java:184)
      	at java.io.Reader.read(Reader.java:140)
      	at org.apache.tools.ant.util.ReaderInputStream.read(ReaderInputStream.java:117)
      	at org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown Source)
      	at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
      	at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
      	at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
      	at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
      	at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
      	at hudson.plugins.warnings.parser.LintParser.parse(LintParser.java:49)
      	at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:315)
      	at hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:294)
      	at hudson.plugins.warnings.parser.FileWarningsParser.parse(FileWarningsParser.java:53)
      	at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:306)
      	at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264)
      	at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215)
      	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184)
      	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2394)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      
      Finished: SUCCESS
      

      Have you already ssen this stacktrace ? I have checked the content of the XML file, and it looks OK :

      <?xml version="1.0" encoding="utf-8"?><jslint><file name="app/javascript/test.js"><issue line="2" char="8" evidence="angular" reason="&apos;angular&apos; is not defined. (no-undef)" /></file></jslint>
      

      Thanks a lot by advance.

      Manu

            drulli Ulli Hafner
            emmanueldemey DEMEY Emmanuel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: