Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 1.08 KB

SONARQUBE.md

File metadata and controls

37 lines (31 loc) · 1.08 KB

< Back

Inspect code quality with SonarQube 🔎

Prerequisites:

  • Docker ^4.9.0

Steps

  1. On the command line, create and run a Docker's SonarQube container

    docker run --name SonarQube-rShop -p 9000:9000 sonarqube:8.9.9-community
  2. On the browser, access SonarQube UI using the default credentials (it will ask you to create a new password):

    http://localhost:9000
    Login: admin
    Password: admin
  3. On the browser, access SonarQube UI and generate a access token:

    http://localhost:9000/account/security
  4. On the command line, execute maven install (run this in project root)

    mvn clean install
  5. On the command line, scan the project using the authentication token generated in sep 3 (run this in project root)

    mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=**place-the-generated-token-here**
  6. On the browser, access SonarQube UI and see the project report:

    http://localhost:9000