16
Sonar And Installation of SonarQube Plugin in mule By Aditya Kuchan

Sonar

Embed Size (px)

Citation preview

Page 1: Sonar

Sonar And Installation of SonarQube

Plugin in mule

By Aditya Kuchan

Page 2: Sonar

Download the sonar here http://dist.sonar.codehaus.org/sonar-3.5.1.zip  and unzip the download to your favorite folder

Sonar Installation

Page 3: Sonar

Unzip and InstallAfter Unzip you will see folder structure would look something like as follows.. 

Page 4: Sonar

Run SonarDepends on your OS, you need to run the executable , for an instance if you are running linux-x86 and 64 bit, then you need to run start.sh

Page 5: Sonar

Sonar Console

Page 6: Sonar

Access your Sonar installationNow you can browse your sonar installation http:localhost:9000

Page 7: Sonar

Generate Sonar Report After we have the sonar installed, we can

generate the reports for any maven project, by adding the following lines in your project pom.xml

Generate Sonar Report

Page 8: Sonar

Go to Help > Install New Software... This

should display the Install dialog box. Paste the Update Site URL (

http://dist.sonar-ide.codehaus.org/eclipse/) into the field Work with and press Enter. This should display the list of available plugins and components:

Eclipse Integration 

Page 9: Sonar

Figure - Sonar Eclipse Plug-in Install

Choose Sonar Java, follow the steps and install the plugin

Note: Please make sure the project that you want to associate with sonar has already analyzed in your sonar installation

Page 10: Sonar

Configure your local/remote sonar in your

Anypoint Studio Go to Window > Preferences > Sonar >

Servers. Sonar Eclipse is pre-configured to access a

local Sonar server listening on http://localhost:9000/. You can edit this server, delete it or add a new one.

Configure Sonar

Page 11: Sonar

Once the Sonar server is defined, the next

step is to link your Anypoint Studio projects with projects defined and analyzed on this Sonar server.

To do so, right-click on the project in the Project Explorer, and then Configure > Associate with Sonar...:

Link your project for the first time

Page 12: Sonar

In the Sonar project text field, start typing the name of the project and select it in the list box:

Click Finish. Your project is now associated to one analyzed on your Sonar server

Page 13: Sonar

Analyze and clean up the code violationsDo local analysis and clean the violations

Page 14: Sonar

Run Sonar Analysis in Local

Run Sonar Analysis on Local

Page 15: Sonar

Sonar violation analysis console II

sonar violation analysis console

Page 16: Sonar

Sonar violations Markers