SonarQube&SonarScanner for beginners

What is sonarqube ?

SonarQube is an open source platform developed by SonarSource for continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs, code smells, and security vulnerabilities on 20+ programming languages.

Installation:

  • Step1: Download the updated sonarqube software: https://www.sonarqube.org/downloads/
  • Step2: Extract the zip folder and go to bin folder and run the StartSonar.bat file.
  • Step3: Before running the StartSonar.bat file set the path of the sonar in system environment variables.
  • Step4: By Default, sonarqube is running on http:localhost:9000
  • Step5: If you want to change the port, Go to the Conf folder change the port in sonar.properties file.
  • Step6: hit the http://localhost:9000sonarqube dashboard will open enter the username as admin and password as admin.

What is sonarqube scanner?

Sonarqube Sanner is basically used for project scanning using the sonarproject.properties file.

Installation:
What is SonarProject.properties?

It's basic information about your project (language, source files, binary files, utf conversion, libraries).

Below is the basic sonarproject.properties file.
sonar.projectName=Janardhan Randhi (your project name)
sonar.projectKey=Migration (Enter you desired key)
sonar.language=java (used language in your project)
sonar.sources=src (source files)
sonar.java.binaries=ImportedClasses (complied classes)
sonar.sourceEncoding=UTF-8 (character encoding )
sonar.projectVersion=1.0 (version of your project)
sonar.java.coveragePlugin=jacoco (For Code coverage ,unit test cases must and should )
How to apply the sonarqube integration for the web application?
  • Step1: Place the sonarproject.properties file in your project root folder.
  • Step2: Start the sonarqube .
  • Step3: Go to project location and open the command prompt run the below command -sonar-scanner
  • Step4: Your project is analyzing with predefined rules provided by sonarqube.
  • Step5: After analyzing the project dashboard will appear with bugs, code smells and duplications.

Applying SonarQube integration to the Sample application.

Step1: Start the sonarQube.

Applying SonarQube integration to the Sample application.
After run the StartSonar.bat file sonarqube is running up

Applying SonarQube integration to the Sample application.

Step2: hit the sonarqube URL: http://localhost:9000


Step3: Enter the username as admin and password as admin.

After successfully login dashboard should be like this.


Step4: Place the sonar-project.properties file in your application root folder.
With Sonar-project.properties file.


Sonar-project.propertie file.
Step5: Go to the project folder open the command prompt and type the below command.
sonar-scanner


After Analyzing the project source files compiler will show build success.

After successful build application data will process into the sonarque dashboard.

Code smells, Bugs, Duplication's, Code Coverage


SUBSCRIBE TO OUR NEWSLETTER

I’m the Founder of quickdevops.com. I am a Professional Blogger, Application developer, YouTuber. I’ve been blogging since 2015.I spend a lot of time learning new techniques and actively help other people learn web development through a variety of help groups and writing web development tutorials for my website and blog about advancements in web design and development.Besides programming I love spending time with friends and family and can often be found together going out catching the latest movie or planning a trip to someplace I've never been before.

5 Responses to "SonarQube&SonarScanner for beginners"

  1. https://www.omgka.com 우리카지노사이트
    https://www.omgka.com/theking 더킹카지노
    https://www.omgka.com/sands 샌즈카지노
    https://www.omgka.com/first 퍼스트카지노
    https://www.omgka.com/yes 예스카지노
    https://www.omgka.com/super 슈퍼카지노
    https://www.omgka.com/gatsby 개츠비카지노
    https://www.omgka.com/33 33카지노
    https://www.omgka.com/world 월드카지노
    https://www.omgka.com/merit 메리트카지노

    ReplyDelete
  2. https://www.bbdd66.com 우리카지노사이트
    https://www.bbdd66.com/theking 더킹카지노
    https://www.bbdd66.com/sands 샌즈카지노
    https://www.bbdd66.com/first 퍼스트카지노
    https://www.bbdd66.com/yes 예스카지노
    https://www.bbdd66.com/super 슈퍼카지노
    https://www.bbdd66.com/gatsby 개츠비카지노
    https://www.bbdd66.com/33 33카지노
    https://www.bbdd66.com/world 월드카지노
    https://www.bbdd66.com/merit 메리트카지노

    ReplyDelete
  3. https://www.omgab.com 우리카지노사이트
    https://www.omgab.com/theking 더킹카지노
    https://www.omgab.com/sands 샌즈카지노
    https://www.omgab.com/first 퍼스트카지노
    https://www.omgab.com/yes 예스카지노
    https://www.omgab.com/super 슈퍼카지노
    https://www.omgab.com/gatsby 개츠비카지노
    https://www.omgab.com/33 33카지노
    https://www.omgab.com/world 월드카지노
    https://www.omgab.com/merit 메리트카지노

    ReplyDelete
  4. https://www.omgqq.com 우리카지노사이트
    https://www.omgqq.com/thekingcasino 더킹카지노
    https://www.omgqq.com/sandscasino 샌즈카지노
    https://www.omgqq.com/firstcasino 퍼스트카지노
    https://www.omgqq.com/yescasino 예스카지노
    https://www.omgqq.com/supercasino 슈퍼카지노
    https://www.omgqq.com/gatsbycasino 개츠비카지노
    https://www.omgqq.com/33casino 33카지노
    https://www.omgqq.com/worldcasino 월드카지노
    https://www.omgqq.com/merit 메리트카지노

    ReplyDelete
  5. https://www.oobbg.com 우리카지노사이트
    https://www.oobbg.com/theking 더킹카지노
    https://www.oobbg.com/sands 샌즈카지노
    https://www.oobbg.com/first 퍼스트카지노
    https://www.oobbg.com/yes 예스카지노
    https://www.oobbg.com/coin 코인카지노
    https://www.oobbg.com/33 33카지노
    https://www.oobbg.com/world 월드카지노
    https://www.oobbg.com/merit 메리트카지노
    https://www.oobbg.com/gatsby 개츠비카지노

    ReplyDelete