sonar-scala

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

Out-of-the-box Scalastyle integration

sonar-scala provides 69 built-in Scalastyle inspections, which are automatically checked on SonarQube analysis - no extra setup required.

[object Object]

Support for Scapegoat

sonar-scala provides a seamless integration with Scapegoat. Generate a Scapegoat report and sonar-scala will process it and create issues in SonarQube based on your quality profile. There are 118 Scapegoat inspections that are supported by sonar-scala.

[object Object]

Built-in quality profiles for Scala

sonar-scala provides two rules repositories and four built-in quality profiles - one for Scalastyle, one for Scapegoat as well as a combination of those two: Scalastyle+Scapegoat and the Recommended by sonar-scala profile, which is a subset of those that we recommend for the best results.

[object Object]

Coverage and unit test metrics

sonar-scala integrates with Scoverage and reports coverage results back to SonarQube. It also reads JUnit-style reports produced by testing frameworks like ScalaTest or Specs2 and turns those into test metrics in SonarQube.

[object Object]

Minimal setup effort

Thanks to provided Docker images of SonarQube with bundled sonar-scala and a dedicated sbt plugin, sbt-sonar, you can be up and running and try out sonar-scala in a matter of minutes.

docker run -p 80:9000 -d \
mwizner/sonarqube-scala-plugins:latest-full
sbt -Dsonar.host.url=http://localhost \
clean coverage test coverageReport scapegoat sonarScan

GitHub pull request decoration New!

sonar-scala can be run in a "decoration mode", which can analyse your pull requests from GitHub and any new issues introduced in the codebase will be posted as inline comments directly on the pull request. GitHub Enterprise is also supported.

[object Object]
[object Object]