Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

mc1arke/sonarqube-community-branch-plugin

Developer Tools

Adds branch analysis and pull request decoration to the Community edition of SonarQube via a JAR plugin.

2,903
633
Java
LGPL-3.0
7 years old

What it does

SonarQube's Community Edition does not include branch analysis or pull request decoration; only commercial editions do. This project is an unofficial third-party plugin that reimplements those features for the Community server, so each branch can be scanned separately and pull requests can receive comments and status decoration.

It is aimed at teams self-hosting SonarQube Community Edition that want per-branch quality gates and PR feedback without moving to a paid edition. The plugin hooks into both the server and compute-engine processes through a Java agent and also ships a modified frontend archive.

Install and start

Plugin versions track SonarQube versions: plugin 25.4.0 targets SonarQube 25.4.x. Pick the release matching your server from the releases page.

The manual path is:

  1. Download the plugin JAR and the matching sonarqube-webapp.zip.
  2. Copy the JAR into extensions/plugins/.
  3. Add -javaagent:./extensions/plugins/sonarqube-community-branch-plugin-${version}.jar=web to sonar.web.javaAdditionalOpts in conf/sonar.properties.
  4. Add the same agent with =ce to sonar.ce.javaAdditionalOpts.
  5. Replace the contents of the web directory with the webapp archive.
  6. Restart SonarQube and accept the third-party plugin warning.

Alternative deployment options include the prebuilt Docker image, a provided docker-compose.yml (requires a .env with SONARQUBE_VERSION), and the official SonarQube Helm chart, for which the README gives a values snippet that installs the JAR and unpacks the webapp in an init container.

Running branch and PR analysis

Set sonar.core.serverBaseURL so links in PR comments resolve. Analyze the target branch first, then scan the feature branch with sonar.branch.name. For pull request analysis, set sonar.pullrequest.key, sonar.pullrequest.branch and sonar.pullrequest.base; do not pass sonar.branch.* properties at the same time, or the scan is treated as a branch scan and no PR decoration runs. GitHub PR scans additionally need sonar.scm.revision set to the head SHA.

If the PR service cannot reach your SonarQube server, change the Images base URL setting under General > Pull Request, either to the bundled static asset URL or to files you host yourself.

Constraints

  • The plugin is not maintained or supported by SonarSource, and support requests sent to official SonarQube channels may be closed.
  • There is no supported migration path to commercial editions; moving data after using the plugin may lose some or all of it because compatibility with official branch features is untested.
  • Only the listed plugin/SonarQube version pairing is guaranteed; older plugin versions on newer servers and vice versa are not.
  • Modifying SONAR_WEB_JAVAADDITIONALOPTS or SONAR_CE_JAVAADDITIONALOPTS in Docker requires re-adding the agent flags to your overrides.
  • Licensed under LGPL-3.0.

HotRepo's take

On the Java weekly list dated 2026-11-12 the project ranked 18th with 2,903 stars, 633 forks and 7 stars added that week. That is a large accumulated audience with modest weekly momentum, consistent with a mature, narrowly scoped plugin that teams install once and do not star repeatedly. The practical signal is fit rather than velocity: it solves a feature gap the vendor reserves for paid editions, and the README's version-locking and migration warnings are the main things to weigh before adopting it.

Written by AI from the project's README, updated . The project's own docs are the source of truth.