sonarqube plugin usage in studio for code pre commit analysis
TRANSCRIPT
SonarQube plugin usage in Studio for code pre commit quality analysis
By Ramakrishna Narkedamilli
In this presentation will see the below things
How to install Sonarqube plugin in Eclipse Stuido
Integrating with SonarQube server
Run the analysis for the code issues and quality
Prerequisites:
SonarQube server with required Project (Already Analysed, this can be done through jenkins build or Ant build with Sonar ANT plugin)
SonarQube plugin Software for Eclipse studio. This can be download from below https://bintray.com/artifact/download/sonarsource/Distribution/org.sonar.ide.eclipse.site-3.5.0.20150804-1512-RELEASE.zip
Alternatively , You can install the plugin from Eclipse Market place or using Install new software option (using update site http://downloads.sonarsource.com/eclipse/eclipse/)
Install Sonar Plugin in Eclipse:
In Eclipse Click on Help --> Install New Software --> Add --> Local --> Select the above mentioned folder -- > ok --> Enter the name --> ok
Select the above mentioned options and click on next then agree the licence terms then click on finish.
Once installation is done, it will show pop up for eclipse restart then click ok. Once Eclipse Restarted then sonar plugin is ready to integrate with sonar server.
Integration with sonarQube server: Select window --> preferences --> SonarQube --> Servers --> Add
Enter the Sonar Server Url and username, Password values then check the connection using Test connection button then click on Finish.
Right click on Java project and select Configure --> Associate With Sonar
Enter the SonarQube project name which you want to analyze ( already created and analyzed in Sonar server ). When you start typing It will automatically display available project names select appropriate one.
Click on Finish. Now at this point your Eclipse project is integrated with SonarQube server project
Run the Analysis:
Right click on code Project --> SonarQube --> Analyze, then it will run and gets the analysis from server.
Open any file that has errors . Then it will show errors related to that specific file Fix the errors and save Then again click on Java Project --> SonarQube --> Analyze. So It will re run the
analysis and gets the results. Ideally if you fix the errors It will reduce the no of issues.it.
THANKS YOU By Ramakrishna Narkedamilli