Upsource 2017.2 Help

External inspections support

In addition to Upsource native code inspections delivered by its build-in IntelliJ IDEA engine, you can make Upsource display inspection results uploaded from the external inspection runners: IntelliJ global inspections and ReSharper inspections bundled with TeamCity, and SonarQube.

Show inspection results from TeamCity

On the TeamCity side, go through the following steps:

  1. Set up a build configuration (if you don't have one yet) to run code inspections.

  2. In that configuration, define the system property system.teamcity.dont.delete.temp.result.dir=true

  3. If you are running IDEA inspections, add the following command-line script to the last build step:

    zip results-%env.BUILD_VCS_NUMBER%.zip %system.teamcity.build.tempDir%/inspection*result/* curl -u <your-build-tool-integration-credentials-defined-in-upsource> -X POST https://upsource.yourcompany.com/~inspections/project-id/%env.BUILD_VCS_NUMBER%/idea –data-binary @results-%env.BUILD_VCS_NUMBER%.zip

    If you are running ReSharper inspections, add the following command-line script to the last build step:

    zip results-%env.BUILD_VCS_NUMBER%.zip %system.teamcity.build.tempDir%/inspection*result/* curl -u <your-build-tool-integration-credentials-defined-in-upsource> -X POST https://upsource.yourcompany.com/~inspections/project-id/%env.BUILD_VCS_NUMBER%/resharper –data-binary @results-%env.BUILD_VCS_NUMBER%.zip

Show inspection results from SonarQube

To upload and show SonarQube inspections, Upsource uses a dedicated plug-in that should be installed into SonarQube:

  1. Download the plugin from the Upsource download page.

  2. Install the plugin into SonarQube as described here.

  3. Run the sonar-scanner with the following extra parameters:

    sonar.upsource.url=<your-upsource-server-url> sonar.upsource.project=<project-id-in-upsource> sonar.upsource.revision=<VCS-revision-id> sonar.upsource.token=<External-tool-integration-token-defined-in-upsource>
Last modified: 20 November 2017