SonarQube Fundamentals — Issue Types, Quality Gates & Analysis
Analogy — SonarQube's issue classification works like a building inspector's report categories, not one flat "pass/fail." A structural defect (a Bug) gets treated differently from a code violation that's a real security risk (a Vulnerability), which gets treated differently from "this wiring is technically to code but will be a pain to maintain later" (a Code Smell) — same inspection, genuinely different follow-up actions per category.
Issue Types
The Bug/Vulnerability/Code Smell distinction directly drives how a team should prioritize — a Vulnerability generally deserves urgent attention regardless of how "clean" the surrounding code otherwise is; a Code Smell in rarely-touched, stable code may genuinely be lower priority than the same smell in code changing weekly.
Severity Levels
Running an Analysis — SonarScanner
The scanner reads project source, runs the applicable language analyzers, and uploads results to the SonarQube server — the server itself doesn't fetch/analyze code directly, which is why the scanner needs to run wherever the source actually is (a CI runner, a developer's machine via SonarLint for local pre-commit feedback).
Quality Gates — pass/fail conditions
A Quality Gate is a set of conditions a project's analysis must satisfy to "pass" — commonly wired into CI/CD so a failing gate blocks a merge/deploy, the same enforcement pattern as any other CI check. Gates can be customized (different thresholds, different conditions) per project or organization, rather than being locked to the default.
Quality Profiles — what actually gets checked
Quality Profiles determine WHICH rules run and at what severity — this is a separate configuration axis from the Quality Gate, which determines WHAT COMBINATION of results (across whatever rules did run) constitutes pass/fail. Tuning a Quality Profile (disabling a rule generating persistent false positives for a specific codebase's patterns, or adding a stricter rule for security-sensitive code) is a normal, expected part of adopting SonarQube well, not something to avoid touching.
Try It (2 Minutes)
Using the issue types section above:
You should land on: most likely a Security Hotspot initially — this is exactly the kind of pattern requiring human review to confirm whether the input is actually unsanitized/exploitable in context, rather than an automatic Vulnerability classification; a team might choose this to keep the gate focused on genuinely blocking-worthy issues (bugs and security risks) while treating maintainability concerns as visible-but-non-blocking, avoiding gate fatigue from lower-stakes findings; a Quality Profile determines WHICH rules run and at what severity; a Quality Gate determines what COMBINATION of results from those rules constitutes an overall pass or fail.

