When SonarQube misbehaves, the cause is usually one of a handful of familiar issues. Here is how to spot and fix them fast.
The usual suspects
- 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
Commands for diagnosis
sonar-scanner -Dsonar.host.url=http://localhost:9000 -Dsonar.token=$SONAR_TOKENPrevent the repeat
- Enforce a 'new code' Quality Gate on every PR
- Wire coverage reports into the scan
- Triage security hotspots, don't blanket-ignore them
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.