SonarQube Eclipse Configuration with SonarLint Plugin

The SonarQube Eclipse plugin does not work with SonarQube 5.2+. It is replaced by SonarLint for Eclipse. SonarLint is an Eclipse plugin that provides on-the-fly feedback to developers on new bugs and quality issues injected into Java, JavaScript, and PHP code. To Configure SonarLint in eclipse follow below steps.

 

1.Open Eclipse IDE

 

2.Choose any one from below Options

 

  • Go to Help > Eclipse Marketplace…and search for “SonarQube”

 

 

3.Select the Features and Confirm Installation

 

4.Accept the license, Finish the Installation and restart Eclipse

 

 

Add SonarQube Server to Eclipse

To add SonarQube Server to Eclipse do following things

1.Select File New → Other →  SonarLint New Server Next fill the details

2.Test the Connection & Finish

 

Configuring Eclipse Project with SonarLint plugin

1.Select Project to be Configure SonarLint, for Ex: SonarJava as below

2.Navigate to root folder of the project & run sonar-runner -e

 

3.Open http://localhost:9000/projects check whether it is analyzed or not

 

4.If analyzed, Right Click on Project & Select → SonarLint →Bind to SonarQube Object & Select appropriate SonarQube Project from the Server & Finish

 

Analyze Eclipse Project with SonarLint plugin

Do some changes in the files or add new Files to the Project & analyze project by

Right Click on Project & Select → SonarLint →Analized Changed files

 

Go to project home page in SonarQube for Ex: http://localhost:9000/dashboard?id=SonarDemo and see the changes