Setup — SonarQube Locally

Manoj kumar
Build for Billions
Published in
3 min readNov 1, 2019

SonarQube on Local machine is now easy

What is SonarQube?

SonarQube is an opensource tool for continuous code monitoring, automation on code reviews, Code coverage on the unit test and much more. It supports 15 programming languages in the community edition.

When SonarQube?

When as a developer, we need to follow the coding standards and need to maintain the code healthier. For that, we need to regulate the rules and follow in our organization and we need to review it before deployment.

Why SonarQube?

SonarQube automates this task and sends us the immediate report and we can make our code healthier on the go. More than 10 languages it supports and it is really a helpful buddy for the techies, will improve productivity and invisibly it trains the developers with correct coding patterns.

Installation

For Installation, You need to download,

  1. Java JDK > 11, click here.
  2. SonarQube server, click here.
  3. SonarQube Cli, click here.

Add the environment variables for the respective paths for JDK and SonarQube Cli

SonarQube Architecture

Implementation

Starting the Sonar Server

  1. In sonarQube under bin/windows-x86–64 folder, Click on startSonar.bat

2. you will get like this,

3. By default, SonarQube will run on port 9000.

Creating Project & Pushing code to server

4. Click on login and use Admin/Admin as Username and password.

5. Create a new project, Enter the details & Click on Setup.

6. Now you need to generate a unique token for your project, Click generate and click on Continue.

7. Select your project Configurations, For me here, Am using it for python on windows, so I will be selecting like this,

8. Below that you will find a command, copy that

9. paste it your project’s root folder, Run the command.

10. Now you will get like this,

Result Time

And the dashboard for your project will look like this and if errors, it automatically points it. And Also we can see the specific piece of code which makes a bug. Under issues, you will find your code smells and bugs

If any doubts feel free to mail — buildforbillions@gmail.com

And That’s it for today,

We will meet soon on another tech story soon,

Till then bubye from Manoj Kumar Build For Billions

--

--