On my job I have a lot to do with SonarQube. Like many other companies we use this tool to perform static code analysis for our projects.

I was excited when Sonarqube announced the Branch Analysis Feature for its SonarQube Developer Edition, which enabled us to increase the transparency of quality issues for our development branches in relation to our master-branch.

We were using (and still use) the Sonar GitHub Plugin to help developers when approving pull requests. This solution is based on so called Sonar preview-scans, which can cover only a subset of the full Sonar scan and can therefore not compute a useful leak period.

The idea for Swingletree was born. A pretty non-invasive integration using Sonar webhooks and GitHub Apps. More details about the internals of Swingletree can be found in the project’s readme.

Keep in mind you will need a license for the SonarQube Developer Edition (or a higher license edition) to be able to use the Branch Analysis Feature.