An SBT plugin to publish code quality data to SonarQube
Add the following to your project/plugins.sbt
file:
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.
enablePlugins(SonarRunnerPlugin)
To use specific Sonar settings, add the following to your build.sbt
file:
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 <arg> Define property
-e,--errors Produce execution error messages
-h,--help Display help information
-v,--version Display version information
-X,--debug Produce execution debug output
sonarRunnerOptions := Seq("-e", "-X")
Run Sonar
sbt sonar
http://docs.sonarqube.org/display/SONAR/Analysis+Parameters
https://bintray.com/aol/scala/sbt-sonarrunner-plugin/view
maestr0 - Pawel Raszewski