A docker-compose recipe for out-of-the-box SonarQube LTS instance with support for Scala, Scoverage (code coverage metrics) and Scalastyle + Scapegoat (static code analysis). 😎
To start SonarQube in a daemon mode, simply run:
docker-compose up -d
Once docker pulls all the required images and starts up the containers, the application should become available on http://localhost. The default SonarQube login details for the Administrator account are admin:admin
.
You can also use a standalone docker image which contains SonarQube LTS with bundled Scala plugins mwizner/sonarqube-scala-plugins:2.5.0-full
.
To start the container issue the following command:
docker run -d --name sonarqube-scala-plugins-full \
-p 80:9000 \
-e SONARQUBE_JDBC_USERNAME=sonar \
-e SONARQUBE_JDBC_PASSWORD=sonar \
-e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost/sonar \
mwizner/sonarqube-scala-plugins:2.5.0-full
Please note that if you don't specify the SONARQUBE_JDBC_URL
variable, SonarQube will use an embedded H2 database, which is not recommended in production.
- SonarQube 6.7 LTS
- PostgreSQL 10.2
- External SonarQube plugins:
- mwz/sonar-scala - provides support for scalastyle and scoverage.
- arthepsy/sonar-scala-extra - adds scapegoat inspections.
Version | SonarQube | sonar-scala | sonar-scala-extra |
---|---|---|---|
2.5.0 | 6.7.3 LTS (documentation) (changelog) | 6.4.0 | 1.3.0 |
2.4.0 | 6.7.3 LTS (documentation) (changelog) | 6.3.0 | 1.3.0 |
2.3.0 | 6.7.3 LTS (documentation) (changelog) | 6.2.0 | 1.3.0 |
2.2.1 | 6.7.3 LTS (documentation) (changelog) | 6.1.0 | 1.3.0 |
2.2.0 | 6.7.2 LTS (documentation) (changelog) | 6.1.0 | 1.3.0 |
2.1.0, 2.0.0 | 6.7.1 LTS (documentation) (changelog) | 6.0.0 | 1.3.0 |
1.0.0 | 5.6.7 LTS (documentation) | 0.0.3 | 1.3.0 |
sbt-sonar is an sbt plugin which provides a way to automate analysis of Scala projects with SonarQube.
- 2.5.0 - Upgraded sonar-scala to 6.4.0.
- 2.4.0 - Upgraded sonar-scala to 6.3.0.
- 2.3.0 - Upgraded sonar-scala to 6.2.0.
- 2.2.1 - Upgraded SonarQube to 6.7.3 LTS.
- 2.2.0 - Upgraded sonar-scala to 6.1.0 & SonarQube to 6.7.2 LTS.
- 2.1.0 - Published docker image with Scala plugins to dockerhub mwizner/sonarqube-scala-plugins.
- 2.0.0 - SonarQube 6.7.1 LTS.
- 1.0.0 - SonarQube 5.6.7 LTS.
The project is licensed under the Apache License v2. See the LICENSE file for more details.