jenkins每晚构建期间的java脚本解析错误.将声纳升级到4.3.2之后 [英] java script parsing error during jenkins nightly build. after upgrading sonar to 4.3.2

查看:97
本文介绍了jenkins每晚构建期间的java脚本解析错误.将声纳升级到4.3.2之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将声纳从 3.4 升级到 4.3.2 版本后,我们在jenkins每晚构建期间遇到了Java脚本解析错误.在上一个版本中一切正常.声纳运行程序仍为版本2.请提供有关解决此错误的建议.使用的插件是sonar-javascript-plugin-1.6sonar-squid-java-plugin-1.6.

After upgrading sonar from 3.4 to 4.3.2 version, we are getting java script parsing error during jenkins nightly build. It was all working fine in last version.The sonar runner is still of version 2. COuld you please advice on resolving this error. The plugin used is sonar-javascript-plugin-1.6, sonar-squid-java-plugin-1.6.

错误详细信息:

[INFO] [12:56:47.163] Sensor JavaScriptSquidSensor...
[INFO] [12:56:47.275] 98 source files to be analyzed
[INFO] [12:56:57.330] 10/98 files analyzed, current is /var/lib/jenkins/jobs/Nightly_Build_abc_CAD_src/workspace/abc_CAD_src/src/main/webapp/auth/js/lib/angular/jquery-ui-1.9.0.custom.js
[ERROR] [12:57:01.429] Unable to parse file: /var/lib/jenkins/jobs/Nightly_Build_abc_CAD_src/workspace/abc_CAD_src/src/main/webapp/js/lib/csrfguard.js
com.sonar.sslr.api.RecognitionException: Parse error at line 199 column 13 failed to match all of: spacing IDENTIFIER NULL TRUE FALSE NUMERIC_LITERAL stringLiteral REGULAR_EXPRESSION_LITERAL LBRACKET LCURLYBRACE LPARENTHESIS FUNCTION NEW THIS IDENTIFIER NULL TRUE FALSE NUMERIC_LITERAL stringLiteral REGULAR_EXPRESSION_LITERAL LBRACKET LCURLYBRACE LPARENTHESIS FUNCTION NEW NEW THIS IDENTIFIER NULL TRUE FALSE NUMERIC_LITERAL stringLiteral REGULAR_EXPRESSION_LITERAL LBRACKET LCURLYBRACE LPARENTHESIS FUNCTION NEW THIS IDENTIFIER NULL TRUE FALSE NUMERIC_LITERAL stringLiteral REGULAR_EXPRESSION_LITERAL LBRACKET LCURLYBRACE LPARENTHESIS FUNCTION NEW NEW DELETE VOID TYPEOF INC DEC PLUS MINUS TILDA BANG

推荐答案

正如OP上的注释所阐明的那样,您的解析错误是由于某些先前排除的文件不再从分析中排除的结果.现在包含这些文件,因为您的排除项是在分析时指定的(即在pom.xml或sonar-project.properties中),并且不再受支持.我相信发生在 3.5

As clarified in the comments on the OP, your parsing errors are a result of some previously-excluded files no longer being excluded from the analysis. Those files are now included because your exclusions are specified at analysis time (i.e. in pom.xml or sonar-project.properties), and that is no longer supported. I believe that happened in 3.5

要消除解析错误,您需要在界面中重新指定排除项. 文档应该会有所帮助.

To eliminate the parsing errors, you'll need to re-specify your exclusions into the interface. The docs should help.

这篇关于jenkins每晚构建期间的java脚本解析错误.将声纳升级到4.3.2之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆