Using Static Code Analysis Tool “SONARQUBE”

KUSHAGRA BANSAL
2 min readNov 22, 2020

--

AIM: Using Static Code analysis Tool “SONARQUBE”

Prerequisite: Setup maven and Eclipse at your local machine

Step-1: Setup Maven Project using Eclipse IDE and open Sonarqube at localhost.

below output shows the homepage of the Sonarqube.

Step-2: Create your maven project at the eclipse.

Also, you can add this dependency at your pom to prevent further errors.

<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>

Step-2:

Open Project Path and use Command: “mvn clean install sonar:sonar

  • Dsonar.host.url=http://localhost:9000 -Dsonar.analysis.mode=publish”

Step-3:

Now you can check Bugs, Vulnerabilities, Code Coverage, Code Smells, Duplications, etc….

--

--

No responses yet