The warnings plug-in does not scan js files using the JSLint scanner. It only 
visualizes the results from JSLint. I.e., you need to run JSLInt in your build. 
And then the plug-in will pick up these results and visualizes these on the 
build page.

Ulli

Am 29.08.2013 um 11:00 schrieb Giovanni Toraldo <m...@gionn.net>:

> Hi,
> 
> I've setup a new project with the latest version of warnings plugin to scan 
> js file with the JsLint integrated scanner.
> 
> However, it looks like that the plugin is using the wrong scanner (an XML 
> one?), hence I've selected JsLint from the dropdown for files of type **/.js
> 
> The stacktrace I get:
> 
> [WARNINGS] Parsing of file 
> /var/lib/jenkins/workspace/project/public/js/frontend.js failed due to an 
> exception:
> 
> org.kohsuke.stapler.framework.io.IOException2: org.xml.sax.SAXParseException; 
> lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
>       at hudson.plugins.warnings.parser.LintParser.parse(LintParser.java:54)
>       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.act(FilePath.java:904)
>       at hudson.FilePath.act(FilePath.java:877)
>       at 
> hudson.plugins.warnings.WarningsPublisher.parseFiles(WarningsPublisher.java:436)
>       at 
> hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:319)
>       at 
> hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:333)
>       at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
>       at 
> hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
>       at 
> hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
>       at hudson.model.Build$BuildExecution.post2(Build.java:183)
>       at 
> hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
>       at hudson.model.Run.execute(Run.java:1600)
>       at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
>       at hudson.model.ResourceController.execute(ResourceController.java:88)
>       at hudson.model.Executor.run(Executor.java:241)
> Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 
> Content is not allowed in prolog.
>       at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
>       at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1388)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:998)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
>       at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
>       at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>       at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
>       at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
>       at 
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
>       at 
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
>       at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
>       at hudson.plugins.warnings.parser.LintParser.parse(LintParser.java:49)
> 
> Any hint?
> 
> Thanks.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to