View all services
Talk to QA Advisor
Browse the Knowledge Hub211 resources
/Tools Library/SonarQube
Tools Library · Review and guide

SonarQube review: pricing, alternatives and setup

SonarQube is Sonar’s static analysis platform for code quality and security. It reports bugs, vulnerabilities and maintainability issues, imports test coverage, tracks duplication, and enforces quality gates on new code. It comes as SonarQube Server, self-managed in Developer, Enterprise and Data Center editions; the free, open-source SonarQube Community Build; and SonarQube Cloud, formerly SonarCloud, with SonarQube for IDE in the editor.

QAble has evaluated this tool and works alongside it. The factual sections are complete; our view is bounded to what we have actually seen rather than a long-term verdict.

last reviewed
13 October 2026
version covered
SonarQube Server 2026.5 LTA, Community Build 26.10
licence
Freemium

Reviewed by Viral Patel

Co-Founder, QAbleLast reviewed 13 October 2026

At a glance

SonarQube at a glance

Official site
Vendor
Sonar
Category
Code quality, Security testing
Licence
Freemium (Community Build under LGPL 3.0; SonarQube Server editions and SonarQube Cloud paid plans are commercial)
Platforms
Self-hosted, Cloud
Integrates with
Jenkins, GitHub, GitLab, Azure DevOps, Maven
First released
2007
Version reviewed
SonarQube Server 2026.5 LTA, Community Build 26.10

Verdict

Our verdict on SonarQube

Strengths

  • Quality gates on new code let a legacy project adopt strict standards without fixing old code first
  • One dashboard combines issues, imported coverage, duplication and security findings across many languages
  • Pull request analysis and decoration put findings on the change, not in a separate report
  • SonarQube for IDE in connected mode applies the same rules in the editor before commit
  • Free Community Build and a free SonarQube Cloud plan for small private codebases

Weaknesses

  • The Community Build analyses one branch per project, with no pull request analysis
  • Self-managed instances need a database, upgrades through LTA steps and someone to own them
  • Commercial pricing scales with lines of code, so large monorepos reach higher tiers quickly
  • Product and edition names changed recently, so much online material uses outdated names

Our take

SonarQube is the usual choice for enforcing a quality gate in a pipeline, and the setting that makes it adoptable on a legacy codebase is the gate on new code: hold changed code to the standard and let old code improve as it is touched. The common failure is enabling every rule at once, which buries teams in thousands of issues nobody will fix and discredits the tool. QAble has evaluated SonarQube rather than run it long term, so treat this as a bounded take. Check edition limits early: the free Community Build analyses a single branch, and pull request analysis starts with the Developer Edition or SonarQube Cloud. Sonar’s product names changed recently, so older guides refer to SonarCloud, SonarLint and the Community Edition. Server 2026.5 LTA, released on 29 September 2026, requires PostgreSQL 15 or later.

We have evaluated this tool rather than maintained a long-running suite on it, so this is a bounded view rather than a long-term verdict. The rest of this page is factual.

How it works

What is SonarQube and how does it work?

A scanner in CI, analysis on the platform

Analysis starts with a scanner running in your build: the SonarScanner CLI, the Maven or Gradle scanner, the .NET scanner, or the official GitHub Action. The scanner analyses the code where the build runs and sends a report to SonarQube Server or SonarQube Cloud, which processes it in a background task and then computes the quality gate. That split explains two common surprises. A pipeline step can succeed before the gate result exists, so failing the build needs a separate wait. And SonarQube never runs your tests: coverage comes from reports your test tools generate, such as LCOV for JavaScript and TypeScript, which the scanner imports.

New code is the unit of enforcement

Every project has a new code definition: changes since the previous version, within a number of days, since a specific analysis, or relative to a reference branch. For pull requests, new code is whatever differs from the target branch. The built-in Sonar way quality gate applies four conditions to new code only: no new issues, all new security hotspots reviewed, at least 80% coverage, and at most 3% duplication. A fudge factor ignores coverage and duplication conditions until there are at least 20 new lines, so tiny changes are not blocked. Because changed code usually touches old code, the whole codebase improves over time without a clean-up project.

Rules, quality profiles and two instance modes

Rules are grouped per language into quality profiles, with Sonar way as the default, and each project uses one profile per language. How issues are classified depends on the instance mode. In Multi-Quality Rule mode, the default for new SonarQube Server instances, a rule can affect several software qualities, security, reliability and maintainability, with a separate severity for each. Standard Experience keeps the older single type per rule: bug, vulnerability or code smell. Instances upgraded from old versions may still run Standard Experience. Sonar is also phasing out security hotspots in favour of security issues, so profiles and gates that refer to hotspots will change over the coming releases.

Editions decide what gets analysed

The Community Build is free and open source under LGPL 3.0, released monthly, covering more than 20 languages including Terraform, Kubernetes and Docker files, with analysis of each project’s main branch. Developer Edition adds branch and pull request analysis, more languages including C, C++, Objective-C, Swift, ABAP, T-SQL and PL/SQL, and injection vulnerability detection. Enterprise Edition adds languages such as Apex and COBOL, custom security configuration and portfolios, and is the edition Sonar’s documentation lists for advanced security analysis. Data Center Edition adds high availability and horizontal scaling. SonarQube Cloud offers the same analysis as a managed service, with Free, Team and Enterprise plans. The edition you buy largely decides which workflow is possible.

Strengths

What it does well

Quality gates that can stop a merge

A quality gate is a set of conditions on metrics such as new issues, coverage and duplication, evaluated after each analysis. Its status can be reported to the CI pipeline to fail a job or to the pull request to block a merge. That turns code quality from a dashboard nobody visits into a rule the team agreed and cannot quietly skip.

Findings on the pull request

With Developer Edition and above, or SonarQube Cloud, branches and pull requests are analysed separately and findings are posted to the pull request on GitHub, GitLab, Azure DevOps or Bitbucket. Reviewers see new issues and the gate status on the change itself, while the context is fresh and the author is still working on it.

Coverage and duplication tracked over time

SonarQube imports coverage reports from tools such as JaCoCo, LCOV producers, coverage.py and .NET coverage tools, and tracks duplication itself. Seeing coverage on new code next to the issues found in that code is more useful than a single overall coverage figure, which on a legacy project mostly measures history.

Security analysis alongside quality

The same analysis reports security vulnerabilities, from simple pattern rules in the Community Build to taint analysis that follows untrusted data through the code in commercial editions. SonarQube Advanced Security adds software composition analysis for vulnerable dependencies and advanced SAST. For many teams this covers the first layer of application security without a separate tool.

The same rules in the editor

SonarQube for IDE, formerly SonarLint, is a free extension for the major IDEs that analyses code as it is written. In connected mode it syncs the project’s quality profile and issue status from SonarQube Server or Cloud, so developers see the findings the pipeline would report before they commit.

Breadth across a mixed estate

One platform covers Java, JavaScript, TypeScript, C#, Python, Go, PHP and infrastructure as code such as Terraform and Kubernetes files, plus, in paid editions, C, C++, Swift and legacy languages. An organisation with several stacks gets one quality model, one gate definition and one dashboard, rather than a different linter and report per team.

Pricing

SonarQube pricing and licensing

SonarQube has a free route and two commercial ones. The Community Build is free and open source for self-managed use. SonarQube Server’s Developer, Enterprise and Data Center editions are licensed per instance per year according to the lines of code analysed, priced through Sonar’s sales team. SonarQube Cloud has a free plan for small private codebases, a Team plan priced by lines of code, and an Enterprise plan on quote. SonarQube for IDE is free.

  • Community Build: free under LGPL 3.0, self-managed, released monthly; no branch or pull request analysis.
  • SonarQube Server: Developer, Enterprise and Data Center editions, priced per instance per year by maximum lines of code. Each project counts its largest branch, excluding comments, blank lines and test code; past the limit, new analyses are rejected. Free trials are available.
  • SonarQube Cloud: Free plan for up to 50,000 lines of private code; Team plan billed monthly by lines of code with a 14-day trial; Enterprise on quote. Public open-source projects under an OSI licence are free.
  • SonarQube Advanced Security, for dependency scanning and advanced SAST, is a separate product; confirm with Sonar which plans include it.
  • Hidden cost of self-managing: a PostgreSQL 15 or later database, server capacity, monitoring, and upgrades that must pass through each LTA release in turn.

Checked against the vendor’s own pages on 13 October 2026. Pricing changes; confirm on the official site before buying.

Getting started

Getting started with SonarQube

Setup, step by step

  1. Start a local Community Build with Docker and open http://localhost:9000.
  2. Log in as admin with password admin and set a new password when prompted.
  3. Create a project, then generate a token for it under Provide a token.
  4. Add sonar-project.properties at the repository root with the project key and source folders.
  5. Generate a coverage report with your test runner so the scanner has something to import.
  6. Run the scanner, locally or through the GitHub Action, and open the project dashboard.

Install

docker run -d --name sonarqube -e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true -p 9000:9000 sonarqube:community
# then browse to http://localhost:9000 and log in as admin / admin

A first example

# sonar-project.properties for a TypeScript app with Playwright and unit tests
sonar.projectKey=shop-web
sonar.projectName=Shop web

# Production code and test code are declared separately
sonar.sources=src
sonar.tests=src,tests
sonar.test.inclusions=**/*.test.ts,tests/**/*.spec.ts
sonar.exclusions=**/*.test.ts,**/generated/**

# Coverage is imported, never measured by SonarQube itself.
# This property covers TypeScript too; sonar.typescript.lcov.reportPaths is deprecated.
sonar.javascript.lcov.reportPaths=coverage/lcov.info

What trips people up first

Coverage showing 0% and the quality gate failing on it. SonarQube does not run tests, so unless the build produces a coverage report before the scanner runs, and the report path matches the property exactly, every line counts as uncovered and the Sonar way gate fails on its 80% new code condition. Run tests with coverage first, check the report file exists in CI, and use sonar.javascript.lcov.reportPaths for both JavaScript and TypeScript. The second early surprise is blame data: shallow clones in CI hide history, so set fetch-depth to 0 when checking out.

In practice

Using SonarQube in practice

Adopting it on an existing codebase

Start with the built-in Sonar way profile and gate, and resist enabling every available rule: the extra rules mostly add noise, and a first dashboard with thousands of issues teaches the team to ignore it. Choose a new code definition that matches how you release, usually previous version for versioned products or a reference branch for trunk-based teams, so the gate judges only what changed. Review findings on old code as a backlog, not as a blocker. If a rule produces findings the team consistently rejects, change the profile by extending Sonar way and deactivating it, with the reason recorded, rather than marking hundreds of issues as accepted one by one. Revisit the profile each quarter as the codebase improves.

Analysis and a blocking gate in GitHub Actions

The official sonarqube-scan-action runs the scanner for SonarQube Server and SonarQube Cloud; the older sonarcloud-github-action is deprecated in its favour. Check out with full history so blame and new code detection work. The scan action does not wait for the gate, so add the official quality gate check action, which polls for the result and fails the job when the gate fails; set its timeout so a slow server does not burn runner minutes. Maven, Gradle and .NET projects should use their own scanners rather than this action.

# .github/workflows/sonarqube.yml
name: sonarqube
on:
  push:
    branches: [main]
  pull_request:
    types: [opened, synchronize, reopened]
jobs:
  analyse:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
        with:
          fetch-depth: 0   # full history for blame and new code
      - uses: actions/setup-node@v7
        with:
          node-version: 24
          cache: npm
      - run: npm ci
      - run: npm test -- --coverage   # must write coverage/lcov.info
      - uses: SonarSource/sonarqube-scan-action@v8
        env:
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
          SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}   # Server only
      # Server and Community Build: fail the job if the gate fails
      - uses: SonarSource/sonarqube-quality-gate-action@v1
        with:
          pollingTimeoutSec: 600
        env:
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
          SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

Declaring test code honestly

Tell the scanner which files are tests with sonar.tests and sonar.test.inclusions, and keep them out of sonar.sources. Test code is then excluded from coverage calculations and from the lines of code that commercial licences count. Getting this wrong has visible effects: test files listed as sources drag coverage down, because nothing covers the tests themselves, and inflate the line count you pay for. For end-to-end suites in a separate repository, analyse them as their own project with their own profile, since a Playwright or Selenium framework has different risks from the application it tests.

# sonar-project.properties for a standalone Java Selenium framework
sonar.projectKey=qa-e2e-framework
sonar.sources=src/main/java
sonar.tests=src/test/java
sonar.java.binaries=target/classes
sonar.java.test.binaries=target/test-classes
# Generated page objects or clients are not worth analysing
sonar.exclusions=**/generated/**

Pull requests and the editor loop

The fastest feedback comes from the two places outside the main pipeline. With Developer Edition or SonarQube Cloud, configure the DevOps platform integration so pull requests are analysed against their target branch and decorated with new issues and the gate status, then make the gate a required check. In the editor, install SonarQube for IDE and bind it to the project in connected mode, so local analysis uses the project’s own profile and hides issues already accepted on the server. Developers then fix most issues before pushing, and the pull request gate becomes confirmation rather than a surprise.

Running a self-managed instance well

Run SonarQube Server or Community Build from the official Docker images or the Helm chart; Sonar now describes the ZIP installation as deprecated. Use an external PostgreSQL database, version 15 or later from 2026.5, and never point two instances at the same schema, which Sonar warns will corrupt data. Choose a track: the Community Build releases monthly, while SonarQube Server offers Long-Term Active releases, currently 2026.5, which succeeded 2026.1. Upgrades between LTAs must pass through each one in turn. Back up the database before upgrading, and read the upgrade notes, since 2026.5 also removed Node.js 20 support for JavaScript and TypeScript analysis.

Pitfalls

Common pitfalls

Enabling every rule on day one

Why it happens: More rules feel more rigorous, but most extra rules are stylistic. Thousands of findings on old code bury the important ones and teach the team that the dashboard is noise.

The fix: Start from Sonar way, gate on new code only, and add rules one at a time when the team agrees they catch real problems.

A pipeline that never fails on the gate

Why it happens: The scanner uploads a report and finishes; the server computes the gate afterwards. Without an explicit wait, the job passes whatever the gate says.

The fix: Add the SonarQube Quality Gate Check action on GitHub, or set sonar.qualitygate.wait=true on other CI systems, with a timeout. Make the pull request gate a required check.

Coverage at zero despite a full test suite

Why it happens: SonarQube imports coverage rather than measuring it. A missing report, a wrong path or the deprecated sonar.typescript.lcov.reportPaths property means nothing is imported.

The fix: Generate coverage before the scan, point sonar.javascript.lcov.reportPaths at the LCOV file for both JavaScript and TypeScript, and check the analysis log for the import.

Shallow clones in CI

Why it happens: Default CI checkouts fetch one commit, so SonarQube cannot read blame data or assign issues to authors, and new code detection becomes less reliable.

The fix: Check out with full history, for example fetch-depth: 0 with actions/checkout, as the official action’s documentation recommends.

Following guides that use old product names

Why it happens: SonarCloud is now SonarQube Cloud, SonarLint is SonarQube for IDE, the Community Edition is the Community Build, and the sonarcloud-github-action is deprecated.

The fix: Map names before following a guide, use sonarqube-scan-action for both Server and Cloud, and check which edition a documented feature requires.

Upgrade failures moving to Server 2026.5

Why it happens: 2026.5 LTA requires PostgreSQL 15 or later, removed Node.js 20 support for JavaScript and TypeScript analysis, and can only be reached directly from 2026.1 LTA.

The fix: Upgrade the database and CI Node.js versions first, step through each intermediate LTA, and test the upgrade on a copy of the database.

Compared

SonarQube alternatives compared

ToolScopeLanguagesWhere results appearFree optionPaid model
SonarQubeQuality, coverage, duplication and securityOver 20 free, more in paid editionsDashboard, pull requests and IDECommunity Build; Cloud free to 50k linesPer lines of code
ESLintBugs, conventions and test-code rulesJavaScript, TypeScript, plus JSON, Markdown, CSSCLI output, editor and CI logsEntirely free, MITNone
CodeQLSecurity vulnerabilities and code errorsC/C++, C#, Go, Java, JS/TS, Python, Ruby, Rust, SwiftGitHub code scanning alertsPublic repositories on GitHub.comGitHub Code Security licence for private repositories

FAQ

Frequently asked questions

What are the best SonarQube alternatives?

The alternatives most often weighed against SonarQube are ESLint and CodeQL. The comparison on this page sets them side by side on scope, languages, where results appear, free option and paid model, and the verdict above says where SonarQube is the wrong choice and which of them to pick instead.

Is SonarQube free?

Partly. SonarQube Community Build is free and open source under LGPL 3.0 for self-managed use, and SonarQube for IDE is free. SonarQube Cloud has a free plan for up to 50,000 lines of private code and is free for public open-source projects. SonarQube Server’s Developer, Enterprise and Data Center editions and SonarQube Cloud’s Team and Enterprise plans are paid, priced by lines of code.

What happened to SonarCloud and SonarLint?

They were renamed. SonarCloud is now SonarQube Cloud, SonarLint is now SonarQube for IDE, the self-managed product is SonarQube Server, and the free Community Edition is now SonarQube Community Build. The underlying analysis is shared across the product line. The sonarcloud-github-action is deprecated, and sonarqube-scan-action now scans for both Server and Cloud.

What does the Community Build not do?

The Community Build analyses one branch per project, so there is no branch or pull request analysis and no pull request decoration. It covers more than 20 languages, without C, C++, Swift and other languages from the paid editions, and lacks taint analysis, advanced security features and high availability. For teams that review through pull requests, the Developer Edition or SonarQube Cloud is usually the practical minimum.

Should I choose SonarQube Server or SonarQube Cloud?

SonarQube Cloud suits teams on GitHub, GitLab, Azure DevOps or Bitbucket cloud who would rather not run a server, database and upgrades. SonarQube Server suits organisations that must keep code and results on their own infrastructure, need Data Center high availability, or have network restrictions. Both price by lines of code, and both have free starting points: the Community Build and the Cloud free plan.

How do I make the build fail when the quality gate fails?

The scanner finishes before the gate is computed, so add an explicit wait. On GitHub Actions, run SonarSource/sonarqube-quality-gate-action after the scan with a polling timeout; it fails the job if the gate fails. On CI systems without an integration, set sonar.qualitygate.wait=true, optionally with sonar.qualitygate.timeout, which defaults to 300 seconds. For pull requests, also make the gate status a required check.

What is new in SonarQube Server 2026.5 LTA?

Announced on 29 September 2026, 2026.5 is the new Long-Term Active release after 2026.1. It brings Sonar’s agent products, Vortex, the Remediation Agent and the Hunter Agent, to self-managed servers as opt-in containers, adds reachability-driven dependency analysis for some languages and a new C and C++ taint engine. For upgraders, it requires PostgreSQL 15 or later and drops Node.js 20 for JavaScript analysis.

Does SonarQube replace ESLint?

Not for most JavaScript teams. ESLint runs in the editor and pre-commit with rules you choose, including Playwright, Cypress and Jest plugins that SonarQube does not provide. SonarQube adds a shared dashboard, coverage and duplication tracking, quality gates on new code, security analysis and many more languages. Running ESLint as the fast first check and SonarQube as the gate is a common arrangement.

Alternatives

SonarQube alternatives worth weighing

Resources

Where to go next

Ready

Picking the wrong tool costs more than picking late.

QAble advises on toolchain decisions and then implements them, with engineers who have run these tools on real delivery. Start with a free QA audit.

Talk to QA Advisor