Skip to content

nespresso/sonar-stash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SonarQube Stash (BitBucket) Plugin Build Status

SonarQube is now a real reviewer! SonarQube Stash (BitBucket) plugin is a pull request decorator that displays SonarQube issues on pull request.

Screenshot SonarQube plugin

After every run, in addition of the diff view, you may access an overview of the SonarQube analysis:

Screenshot SonarQube plugin

Getting Started

Prerequisites

  • Git client to checkout the code
  • Maven 3.0.5
  • JDK 1.7
  • SonarQube 4.5.4 (LTS)
  • Stash (BitBucket) 3.x

To build the plugin

This command generates a jar file.

mvn clean install

To deploy the plugin

Just copy the sonar-stash-plugin jar file to the plugin folder of the expected SonarQube server and restart the SonarQube server. For instance, on Linux platform:

~> cp target/sonar-stash-plugin-X.X.jar $SONARQUBE_HOME/extensions/plugins

Configuration on SonarQube server

Go to Settings > Configuration > General Settings > Stash:

Screenshot SonarQube plugin

How to run the plugin?

To activate the plugin, add the following options to the SonarQube runner (for instance with SonarQube Scanner):

For SonarQube 5.2+:

sonar-runner -Dsonar.analysis.mode=preview -Dsonar.stash.notification=true -Dsonar.stash.project=<PROJECT> -Dsonar.stash.repository=<REPO> -Dsonar.stash.pullrequest.id=<PR_ID> -Dsonar.stash.password=<STASH_PASSWORD>

Before SonarQube 5.2:

sonar-runner -Dsonar.analysis.mode=incremental -Dsonar.stash.notification=true -Dsonar.stash.project=<PROJECT> -Dsonar.stash.repository=<REPO> -Dsonar.stash.pullrequest.id=<PR_ID> -Dsonar.stash.password=<STASH_PASSWORD>

Screenshot SonarQube plugin

About

SonarQube Stash (BitBucket) Plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%