An issue arose with Java script parsing during the nightly Jenkins build following the upgrade to Sonar 4.3.2

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

Answer №1

According to the feedback provided in the comments on the original post, the parsing errors you are experiencing are due to certain files that were previously excluded no longer being excluded from the analysis. These files have now been included because exclusions must be specified at analysis time (e.g. in pom.xml or sonar-project.properties), which is no longer supported. This change occurred around version 3.5.

To resolve the parsing errors, you will need to re-specify your exclusions within the interface. You can refer to the documentation for assistance.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Enhancing Image Source URLs with Dynamic Content Using HTML and JavaScript

<img src="https://website.example/convention?plastic_id=**{add-id-here}**&muppet_id=**{add-id-here}**"> I am currently facing a challenge in injecting dynamic content from an external database into the {add-id-here} placeholders. While ...

Creating a dynamic mouse trail effect using CSS and JavaScript without compromising element clickability

I'm looking to create a mouse trail that follows the cursor as it moves, made up of small icons or images that gradually fade out over time. I attempted to achieve this by overlaying a grid on top of all other elements on the page. The grid consists o ...

Create a still image using Three.js

After following the tutorial for setting up a basic scene at this link, it is suggested to call the renderer in the standard way: function render() { requestAnimationFrame( render ); renderer.render( scene, camera ); } render(); However, since I ...

Determine the final pair of digits preceding the decimal point in the expression (4+sqrt(11))^n

Currently, I am faced with a challenging problem that requires me to determine the last two digits before the decimal point for the number [4 + sqrt(11)]n. For instance, when n = 4, [4 + sqrt(11)]4 = 2865.78190..., the result is 65. The parameter n can ...

Skipping $state.go in AngularJS UI-Router

My AngularJs application is designed to navigate to the login page if the user is not logged in and attempts to access a route that requires authentication. if ($localStorage.globals.access_token) { $rootScope.globals = $localStorage.globals; $sta ...

Having difficulty displaying all the database values in my ListView widget

I need help with displaying all the values from my localhost database in a ListView. The REST process and background tasks are handled by my AsyncTask, so I cannot use the onCreate method for this purpose. Here is the relevant code snippet: public class ...

Utilize JavaScript to retrieve data from a JSON document

To extract information from a .json file in node.js, the require function is used. I'm currently developing an Artificial Neural Network that utilizes this code to fetch data from the data.json file. const fs = require('fs'); const json = ...

Tips for updating process.version in a Node.js environment

After upgrading my node version from v3 to v11 using nvm with the command nvm use 11.12.0, I noticed that when I check the version using node -v in the terminal, it correctly shows 11.12.0. I also have a node js application that is started through pm2. I ...

Removing the animation from a Material-UI Select component in React

Currently, I am utilizing the React Material UI's Select Component and I am looking to either remove or quicken the animation that occurs when opening the menu. I attempted the following approach: <Select ... TransitionComponent={({child ...

Steps to include Postman collection in maven pom.xml

After successfully running postman.collection.json files using newman with the provided command, I am now looking to achieve the same outcome through Maven integration. Is it feasible to integrate this process into the pom.xml file in order to execute the ...

Extract all objects from an array where a specific field contains an array

data:[ { id:1, tags:['TagA','TagB','TagC'] }, { id:2, tags:['TagB','TagD'] }, { id:3, tags:[&a ...

When setting a background-image with jQuery, the background will only change once

I am currently attempting to dynamically set the background-image property of an element based on the value of a variable. Oddly enough, it only seems to work the first time. Once I switch to ready, the background image stops changing altogether. The image ...

Raspberry Pi Fast Server: Issue with AJAX not locating images in directory and malfunctioning ID search

I'm completely new to Raspberry Pi, linux, and server concepts, so I'd appreciate explanations at a beginner level. My goal is to create a display similar to those you see in lobbies showing corporate slides and weather updates. While setting up ...

Creating a React component with dynamic content rendering

I am working on a "Card Component" where I have a list of react-icons passed through props. Within the render method of my Card component, this is what it looks like: render() { ... { this.props.icons.map(icon => { return ( &l ...

Is the error log susceptible to cross-site scripting attacks?

Recently, I came across an error logged at window.onerror by one of my users: {"message":"\"nativka already initialized\"","file":"https://staticcf0.ntvk1.ru/nvv.js","line":"12","fileName":"https://staticcf0.ntvk1.ru/nvv.js","lineNumber":"12"} ...

Storing and Retrieving User Identifiers in Next.js

Currently, I am developing a project using Next.js and I have the requirement to securely store the userId once a user logs in. This unique identifier is crucial for accessing personalized user data and creating dynamic URLs for the user profile menu. The ...

What could be causing the jumbotron class to malfunction in version 5 of Bootstrap?

Has anyone else noticed that the jumbotron class is not functioning in Bootstrap 5? I am really confused. Can someone please help me figure this out? <!doctype html> <html lang="en"> <head> <!-- Required meta tags --> & ...

I am having trouble getting the library to generate in my project when running `

(function () { 'use strict'; angular.module ('newApp', [ 'ngAnimate', 'ngCookies', 'ngAria', 'ngCookies', 'ngMessages' ]) .config(function ($routeProvider) { ...

Randomly loading Json files in Ionic is a great way to keep your

I have a div using *ngFor which loads values from a JSON file. I want to load values from different JSON files randomly each time the div is loaded. Is there a way to achieve this using Math.random() or any other methods? html file <div class= ...

Issue with Vue method not providing expected output

As I dive into the world of Vue, I find myself facing a peculiar issue with a method that should return a string to be displayed within a <span>. While I can successfully retrieve the correct value through console.log, it seems to evade passing into ...