Version note: references describe SonarQube Server 2025.2 behaviour. Check your server, scanner and edition requirements. These examples were not run against a live SonarQube server.
What this guide covers
Adding SonarQube works best in stages: first make analysis accurate, then agree on checks, and finally use those checks to block unsuitable changes. This avoids forcing teams to fix every old issue before making useful progress.
Before you start
Start with one repository and a named maintainer. Check which server edition and scanners support its languages, build tools and pull-request workflow.
Step 1: Record the project setup
Fill in a short setup checklist:
Repository and owning team
Scanner/build/runtime versions
Analysed source and test roots
Coverage producer and report path
New-code definition
Gate owner and exception approver
Use real paths and tool versions. Fix missing coverage or incorrect source scope before comparing scores.
Step 2: Observe a few normal changes
Run analysis without changing release rules yet. Check whether findings, new-code comparisons and coverage make sense to the maintainers. Fix configuration errors rather than working around them with broad exclusions.
Step 3: Choose and enforce a gate
Agree on a small set of new-code requirements. Make the pipeline wait for its quality gate. Test a passing and a failing change, then make the check required in merge or deployment rules.
Step 4: Keep exceptions visible
If an exception is necessary, record its reason, approver and expiry date. Plan older-code cleanup separately. Review the setup after changing languages, build tools or repository structure.
Check the result
Maintainers should know how to run analysis, read a failure and contact the right owner. A required check should block a deliberately failing test change, not merely appear on a dashboard.
Conversation
0 commentsNo comments yet. Start the conversation below.