Since upgrading Sonar to version 4.3.2 from 3.4, we have encountered a JavaScript parsing error during Jenkins nightly builds. Everything was functioning properly in the previous version. The Sonar runner is still on version 2. Any advice on how to resolve this error would be greatly appreciated. The plugins being used are sonar-javascript-plugin-1.6
and sonar-squid-java-plugin-1.6
.
Details of the error:
[INFO] [12:56:47.163] Sensor JavaScriptSquidSensor...
[INFO] [12:56:47.275] 98 source files need to be analyzed
[INFO] [12:56:57.330] 10/98 files analyzed, current file 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