Download and unzip the SonarQube distribution (let’s say in “C:\sonarqube” or “/etc/sonarqube”)
Start the SonarQube server:
1 2 3 4 5
# On Windows, execute: C:\sonarqube\bin\windows-x86-xx\StartSonar.bat # On other operating system, execute: /etc/sonarqube/bin/[OS]/sonar.sh console
Download and unzip the SonarQube Scanner (let’s say in “C:\sonar-scanner” or “/etc/sonar-scanner”)
Download and unzip some project samples (let’s say in “C:\sonar-scanning-examples” or “/etc/sonar-scanning-examples”)
Analyze a project:
1 2 3 4 5 6 7
# On Windows: cd C:\sonar-scanning-examples\sonarqube-scanner C:\sonar-scanner\bin\sonar-scanner.bat # On other operating system: cd /etc/sonar-scanning-examples/sonarqube-scanner /etc/sonar-scanner/bin/sonar-scanner
Browse the results at http://localhost:9000 (default System administrator credentials are admin/admin)