← All insightsGetting Started

Getting started with SonarQube

CodeWizard Engineering · 27 October 2025 · 3 min read · Beginner

SonarQube statically analyzes code for bugs, vulnerabilities, security hotspots and 'code smells', and enforces a Quality Gate in CI so problematic changes fail the build.

Why teams use it

  • Catches bugs and vulnerabilities before review
  • Quality Gates enforce a consistent bar across teams
  • Tracks tech-debt and coverage trends over time

Install it

bash
docker run -d --name sonarqube -p 9000:9000 sonarqube:community
# open http://localhost:9000 (admin/admin)

A first working config

Project configuration file.

properties
# sonar-project.properties
sonar.projectKey=acme-web
sonar.sources=src
sonar.tests=test
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.qualitygate.wait=true

Run and verify

bash
sonar-scanner -Dsonar.host.url=http://localhost:9000 -Dsonar.token=$SONAR_TOKEN

Mistakes to avoid early

  • Analyzing but not enforcing the Quality Gate, so nothing improves
  • Chasing a green gate by disabling rules instead of fixing issues
  • No coverage report wired in, so coverage looks like zero

Want senior help putting SonarQube to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult