How to Install and configure SonarQube with SonarScanner for generating sonar Report for your…

How to Install and configure SonarQube with SonarScanner for generating sonar Report for your…

Nandan Kumar's photo
Nandan Kumar
·Oct 2, 2018·

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

1. Steps to Install SonarQube :

* Go to https://www.sonarqube.org/downloads/ and click “Download LTS”

* Once download is complete, Unzip your sonar file in your C or D drive.

* Go to “{Your root path}\sonarqube-6.7.1\bin\windows-x86–64” and click . on StartSonar.bat file.

It will start a Sonar server at “localhost:9000” , You can login to your Sonar with following preset credentials.
username : admin
password : admin

2. Steps to Install Sonar-scanner :

* Go to
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner and click Windows 64 bit.

* Once download is complete, Unzip the file and save it to your C or D drive.

* You can set path variable for Sonar-scanner by adding “{Your root path}\sonar-scanner\bin” to your path

3. Steps to Generate sonar Report:

* Go to Your project’s root directory.

* Execute the following command.

sonar-scanner -D sonar.projectKey="YOUR SONAR PROJECT KEY" -D sonar.sources=."PATH TO YOUR JAVASCRIPT SOURCE FOLDER" -D sonar.host.url=localhost:9000

4. Configuring Your javascript Quality profile:

* Once You are logged In, Click On Quality Profiles and then click dropdown button next to create.

* Click Restore Profile and the import your custom JavaScript-profile XML, Browse the javascript profile & upload it.

 
Share this

Impressum

It would be great to connect with you on

Twitter | Github | Website | LinkedIn | Instagram

Enjoyed reading this as much as I enjoyed writing it for you. support me with a coffee 😍😃 Buy me a Coffee