tumblr counter

SonarQube Tutorial

SonarQube Tutorial explains about how to install /configure SonarQube server for continuous integration and improving code quality.

SonarQube (previously known as Sonar) is an open source platform for Continuous Inspection of code quality. It is written in java and supported for 25+ languages such as Java, C/C++, C#, PHP, Flex, Groovy, JavaScript, Python, PL/SQL, COBOL, etc, it is also used for Android Development

It helps for various tasks and provide reports on duplicated code, coding standards, unit tests, code coverage, complex code, potential bugs, comments and design and architecture.

SonarQube is internally using PMD,Findbugs,CheckStyle etc. You can add additionally plugins according to your requirement

Note

You can also check about configuring SonarQube plugin with Eclipse Eclipse Sonar Tutorial

Setup / Configure Sonar

SonarQube Installation Steps:

You can follow below steps in order to installing Sonar Java Code Analysis Tool. Which will dramatically imporve code quality.

Install Sonar Server

Sonar Server Started

Sonar Server Running

Now, You can see sonar server is started

  1. Copy and unzip sonar.zip and sonar-runner.zip
  2. Start the Sonar server using the script available in SONAR_HOME\bin\windows-x86-32\StartSonar.bat (OS dependent)
  3. After starting the server you can browse to http://localhost:9000

Creating Project & Analysing Using Sonar


For setting environment variable, you can do following steps

Set Sonar Home Variable













SonarQube Tutorial Setup/Install/Configure SonarQube Server Sonar Tutorial How To Improve Code Quality Using Sonar Server SonarQube Static Code Analysis SonarQube Code Review Tool SonarQube Code Coverage Tool SonarQube Source Code Analysis SonarQube Code Inspection

You might also like following tutorials :

Java Tutorial Apache CXF Tutorial Hibernate Tutorial Spring Tutorial Struts Tutorial
5 Comments on "SonarQube Tutorial"
13.11.2013 06:35:34 Nicole
Thanks for the article but i would like to ask how i set a new environment variable?

Thank you
14.11.2013 02:00:18 admin
@Nicole,

I have update the sonar tutorial in order to avoid confusion about setting new environment variable

04.03.2014 06:34:01 sravan
Hi Admin,

I am new to SONAR. I am able to perform a project analysis in SONAR through SONAR - Runner.
I would like to know how to use the WebService API of SONAR.

Could you please provide a tutorial to understand how to consume the WebService API.

Thank you.
30.09.2014 18:05:09 Priti
I have downloaded Sonar qube 3.7.4 version , in that installable i am not able to find sonar.properties file.
Could you please help
15.10.2014 09:17:04 admin
@Prit,

Sorry, I am not tested with the latest version of SonarQube 3.7.4.