Seems that your lint output file uses a different format. The JSLint parser expects an XML file⦠Is there an option to change the format in jslint?
> Am 03.08.2017 um 09:08 schrieb swarna~~ <[email protected]>: > > I have a project in which JSLint parses the log file which contains the > output of the below command: > > ( find "<path>" -name "*.js" -print0 | xargs -0 jslint ) > > "${WORKSPACE}/jslint.log" || : > > > Below is the snippet of the content of the log file: > > ************************************************************* > > <path>/<file>.js > #1 Expected exactly one space between 'function' and '('. > this.connect = function(cb) { // Line 38, Pos 28 > #2 Use spaces, not tabs. > var client = this; // Line 39, Pos 1 > #3 Expected 'var' at column 9, not column 2. > var client = this; // Line 39, Pos 2 > #4 Use spaces, not tabs. > var opts = { // Line 40, Pos 1 > #5 Expected 'var' at column 9, not column 2. > var opts = { // Line 40, Pos 2 > #6 Combine this with the previous 'var' statement. > var opts = { // Line 40, Pos 6 > #7 Use spaces, not tabs. > cert: fs.readFileSync("keys/" + this.name + ".cert.pem"), // Line 41, Pos > 1 > #8 Expected 'cert' at column 17, not column 6. > cert: fs.readFileSync("keys/" + this.name + ".cert.pem"), // Line 41, Pos > 6 > #9 Unexpected sync method: 'readFileSync'. > cert: fs.readFileSync("keys/" + this.name + ".cert.pem"), // Line 41, Pos > 15 > #10 Use spaces, not tabs. > key: fs.readFileSync("keys/" + this.name + ".key.pem"), // Line 42, Pos 1 > #11 Expected 'key' at column 17, not column 6. > key: fs.readFileSync("keys/" + this.name + ".key.pem"), // Line 42, Pos 6 > #12 Unexpected sync method: 'readFileSync'. > key: fs.readFileSync("keys/" + this.name + ".key.pem"), // Line 42, Pos 14 > #13 Use spaces, not tabs. > *********************************************** > > But fails with the below error: > ***************************************************** > [WARNINGS] Parsing warnings in files 'jslint.log' with parser JSLint > [WARNINGS] Finding all files that match the pattern jslint.log > [WARNINGS] Parsing 1 file in /var/lib/jenkins/jobs/lint_cloudpoint/workspace > [WARNINGS] Parsing of file > /var/lib/jenkins/jobs/lint_cloudpoint/workspace/jslint.log failed due to an > exception: > > java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 2; > columnNumber: 1; Content is not allowed in prolog. > at hudson.plugins.warnings.parser.LintParser.parse(LintParser.java:52) > at > hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:282) > at > hudson.plugins.warnings.parser.ParserRegistry.parse(ParserRegistry.java:261) > at > hudson.plugins.warnings.parser.FileWarningsParser.parse(FileWarningsParser.java:44) > at > hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:325) > at > hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:283) > at > hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:234) > at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:203) > at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31) > at hudson.FilePath.act(FilePath.java:996) > at hudson.FilePath.act(FilePath.java:974) > *********************************** > > What is the cause of the above error. Need help. > > 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 [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/5b0fcce5-b34a-4af5-995a-ba09088750fd%40googlegroups.com > > <https://groups.google.com/d/msgid/jenkinsci-users/5b0fcce5-b34a-4af5-995a-ba09088750fd%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/34DD7722-B088-4123-A425-9018CC59C190%40gmail.com. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: Message signed with OpenPGP
