https://github.com/aol/sbt-sonarrunner-plugin
An SBT plugin to publish code quality data to SonarQube
https://github.com/aol/sbt-sonarrunner-plugin
Last synced: about 1 year ago
JSON representation
An SBT plugin to publish code quality data to SonarQube
- Host: GitHub
- URL: https://github.com/aol/sbt-sonarrunner-plugin
- Owner: aol
- License: mit
- Created: 2015-02-12T21:05:35.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-11-13T16:06:20.000Z (over 7 years ago)
- Last Synced: 2025-03-26T21:37:40.140Z (over 1 year ago)
- Language: Scala
- Size: 22.5 KB
- Stars: 16
- Watchers: 66
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sbt-sonarrunner-plugin
An SBT plugin to publish code quality data to SonarQube
## Build status

## Installation
# NOTE this plugin targets sbt 1.1.0+
Add the following to your `project/plugins.sbt` file:
```scala
addSbtPlugin("com.aol.sbt" % "sbt-sonarrunner-plugin" % "1.1.0")
```
To use the SonarRunner settings in your project, add the `SonarRunnerPlugin` auto-plugin to your project.
```scala
enablePlugins(SonarRunnerPlugin)
```
## Configuration
To use specific Sonar settings, add the following to your `build.sbt` file:
```scala
sonarProperties ++= Map(
"sonar.host.url" -> "http://sonarhostname.com",
"sonar.jdbc.username" -> "sonar",
"sonar.jdbc.password" -> "sonar",
"sonar.coverage.exclusions" -> "**/MobileAppController.java,**/SomeClass.java"
)
```
You can also specify the following sonar-runner options:
```
-D,--define Define property
-e,--errors Produce execution error messages
-h,--help Display help information
-v,--version Display version information
-X,--debug Produce execution debug output
```
```scala
sonarRunnerOptions := Seq("-e", "-X")
```
Run Sonar
```bash
sbt sonar
```
## Full list of Sonar analysis parameters
http://docs.sonarqube.org/display/SONAR/Analysis+Parameters
## Bintray
https://bintray.com/aol/scala/sbt-sonarrunner-plugin/view
## Author
maestr0 - Pawel Raszewski