Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
/ sonar-scala Public archive

A free and open-source SonarQube plugin for static code analysis of Scala projects.


Notifications You must be signed in to change notification settings


Repository files navigation


sonatype-badge bintray-badge-lts bintray-badge-lts-79 bintray-badge-lts-67 gitter-badge

A free and open-source SonarQube plugin for static code analysis of Scala projects.

sonar-scala is an independent SonarQube plugin, driven by and developed with :heart: by the community.

Intended for SonarQube 9.4, SonarQube 8.9 LTS, SonarQube 7.9 LTS, SonarQube 6.7 LTS and Scala 2.11/2.12/2.13.

sonar-scala is developed in Scala. It uses the scalariform library to parse the source code and integrates with Scoverage (code coverage), Scalastyle and Scapegoat (static code analysis). It also provides pull request decoration functionality, which can review pull requests on Github and make comments on new issues directly in the pull request instead of reporting them to SonarQube.

Running analysis from a Windows machine is currently not supported - please use Linux or other Unix-like operating system.


See the project website for documentation.


To build the project from sources, run the assembly task in sbt shell and the jar assembled with all of the dependencies required by this plugin should be created in the target/scala-2.13 directory.

To debug the plugin, export the following environment variable before running sonar-scanner for your project:

export SONAR_SCANNER_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000"

Once you've done that, sonar-scanner should display the following message Listening for transport dt_socket at address: 8000. You can now attach your IDE to the process on port 8000, set breakpoints and debug the code.


This project is a continuation of the sonar-scala plugin, which was initially developed by Sagacify.

Many other projects have been used as an inspiration, here is a list of the main ones:


For a full list of changes and releases, please see Changelog.


The project is licensed under the GNU LGPL v3. See the LICENSE file for more details.