An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# sbt-sonarrunner-plugin

An SBT plugin to publish code quality data to SonarQube

## Build status

![Build health](https://travis-ci.org/aol/sbt-sonarrunner-plugin.svg)

## 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