Running SonarQube?

SonarQube quality gate failing every PR? We unstick it.

SonarQube is helpful when the quality gate matches the code and awful when it does not. Teams come to us with a gate that was copied from the sample and now fails every pull request, a plugin that stopped loading after a server upgrade, and a scanner that takes longer than the actual build. We tune the gate against real data, pin the plugins to a tested set, and point the scanner at the code that matters.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

sonar-scanner.log

still failing

What it is

SonarQube at a glance

SonarQube is an on-premise code quality and static analysis platform built by SonarSource, with the first release in 2007 and current major versions still shipping as both Community (free) and commercial editions. It analyses more than thirty languages, tracks code smells, bugs, vulnerabilities and security hotspots, and enforces release standards through a configurable quality gate.

The platform is self-hosted by default, with a web UI, an embedded Elasticsearch, a relational database and a scanner that runs inside CI. SonarCloud is the hosted sibling for teams that would rather not operate the server. Commercial editions add branch and pull request analysis, additional language rules, and portfolio-level governance.

Type
Static analysis and code quality platform
First released
2007
License
LGPLv3 Community, commercial for Developer and above
Maintained by
SonarSource SA
Typically used for
Quality gates in CI, SAST, code review support, portfolio risk reporting

The honest version

SonarQube pros and cons

No technology is all upside. This is where SonarQube earns its place and where it tends to cause trouble.

Where SonarQube is strong

  • Deep language coverageJava, C#, JavaScript, TypeScript, Python, Go, Kotlin, Swift and many more are first-class, which is useful in a mixed stack where SAST-only tools often fall short.
  • Quality gate is a real gateThe pass or fail on new code lets a team raise the bar without rewriting the legacy base at the same time, which is how most successful adoptions work.
  • Rules explain themselvesEvery rule has a description, examples of compliant and non-compliant code, and a rationale, which saves hours of arguing in pull requests.
  • Hotspots instead of pure vulnerabilitiesSecurity hotspots are a separate category from confirmed vulnerabilities, so a security reviewer can approve or dismiss them rather than letting the scanner force the issue.
  • Self-hosted keeps code where it isFor teams that cannot send source to a SaaS, the on-premise model is a hard requirement and SonarQube still fills it cleanly.
  • Portfolio view in commercial editionsRolling up many projects into one view for a security or engineering leader is genuinely useful, if you are on an edition that includes it.

Where SonarQube bites

  • Default quality gate is too strict for legacy codeThe out-of-the-box gate expects coverage and duplication numbers that no mature codebase will meet overnight, which teaches teams to ignore the red tick.
  • Plugin compatibility breaks on upgradeCommunity plugins frequently lag server releases by months, so an upgrade can leave a team without PDF reports, Mantis integration or whichever plugin they relied on.
  • Branch and PR analysis is a paid featureDeveloper Edition and above add the features teams actually want on day one, so the Community edition is useful for a server view but less so for pull request gating.
  • Resource hungry at scaleElasticsearch, the database and the web stack together want real memory, and large monorepos push both analysis time and JVM heap limits.
  • Operational overhead is on youOn-premise SonarQube is a service you own, including upgrades, database backups, Elasticsearch health, and TLS renewal. It is not a set-and-forget appliance.
  • Rule sets can drift between languagesA codebase that mixes Python and JavaScript ends up with rulesets that evolved separately, and getting a consistent bar across languages takes deliberate work.

Sound familiar?

Common SonarQube problems we fix

The SonarQube problems that bring people to us, and what you have once each one is fixed.

Quality gate status: FAILED on new_coverage

Every pull request fails the quality gate

A default gate that demands 80 percent new code coverage on a codebase where the existing coverage is nowhere near that, or a gate on duplication that trips on generated code.

Gate agreed with the team, passing on real work

Plugin not compatible with SonarQube 10.4

Plugins break after a server upgrade

A community plugin that has not released a build for the new server, or a commercial plugin with a license key that was tied to the previous major version.

Plugin set pinned and tested

OutOfMemoryError: Java heap space

Scanner runs out of memory on a big repo

Default heap settings on the scanner and the compute engine that are fine for a modest project and nowhere near enough for a monorepo with millions of lines.

Heap sized against the real codebase

elasticsearch process not up after 300s

The SonarQube server will not start

A Linux host with vm.max_map_count below the Elasticsearch requirement, a disk that is full, or a previous shutdown that left a lock file behind.

Server up and passing health

Not authorized. sonar.login

CI integration fails with authentication errors

A project token that was rotated and never updated in the CI secret store, a global token that was revoked, or a scanner configured with user credentials instead of a dedicated token.

CI authenticated with a real token

Branch analysis requires Developer Edition

Pull request decoration is missing

A Community edition server trying to do branch or pull request analysis, or a Developer edition license that expired without renewal and reverted to Community limits.

PR analysis back where developers see it

Coverage report file not found

Coverage never reaches SonarQube

A coverage file generated in CI but not picked up because the sonar.coverage.jacoco.xmlReportPaths or lcov path is wrong, or the file is in a working directory the scanner no longer sees.

Coverage uploaded and visible

code smells: 12,421

The legacy count is overwhelming adoption

A long-running codebase that lights up with historical findings the day SonarQube goes in, discouraging the team before any new code is measured.

Focus on new code, legacy as backlog

What we do

SonarQube help, from server to quality gate

Reach us for a stuck upgrade, or hand over the whole SonarQube estate.

Rescue
Server down after upgrade, scanner hitting OOM on every build, or a gate that nobody can get green. We put it back on its feet first and tune it second.
Quality gate design
A gate on new code only, with coverage and duplication targets set from current baselines rather than aspirational defaults, so it passes when it should.
Upgrades and plugin audit
A pinned plugin set tested against the target server version, with a rollback path and the upgrade run outside business hours.
CI integration
Dedicated scanner tokens, branch and PR analysis configured properly, and coverage wired through from your test runner to the server.
SonarQube or SonarCloud
Honest advice on whether to stay on-premise or move to SonarCloud, including data residency, cost and operational effort compared like for like.
Managed Tech
Server patching, database backups, quality gate reviews each quarter, and an engineer to call when a release is held up by a surprise finding.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running SonarQube alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

SonarQube questions

Something else? Call+1 737 727 7327

Why does our SonarQube quality gate fail every pull request?

Almost always the default gate is in use, which expects high coverage and low duplication on new code before the team has agreed those targets. The fix is to design a gate that measures only new code, with numbers the team signed up to, and leave historical findings as a backlog rather than a release blocker.

Why did our SonarQube plugins stop working after an upgrade?

SonarQube major versions drop the plugin API they no longer support, and community plugins lag behind by weeks to months. The right approach is to pin every plugin to a version known to work on the target server, test the upgrade on a staging server, and only roll out once the plugin set is confirmed.

How do we stop SonarQube from running out of memory?

Raise the scanner and compute engine heap in sonar.properties and in the scanner invocation, and audit whether the analysis is pulling in generated code or vendored directories that should be excluded. For very large repos, a bigger JVM is not enough on its own; the scope has to come down as well.

Should we stay on SonarQube or move to SonarCloud?

SonarQube suits teams that have a reason not to send source outside their network, or already run a well-managed self-hosted stack. SonarCloud removes the server operational work for teams that are comfortable with SaaS and have modest to mid-size repos. We give a direct recommendation after looking at your repos and your compliance posture.

Can SonarQube replace Snyk for application security?

SonarQube covers code quality and a fair amount of application vulnerability detection, especially in supported languages. Snyk is stronger on open source dependency and container scanning. Most teams who do both end up keeping each for its stronger area rather than picking one to do everything.

How much does SonarQube help cost?

The quote is free. Tell us the server edition, the scale of your codebases, and what you want in a better state, and we come back with a figure before the work begins.

Free estimate

SonarQube giving you trouble?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.