How to link sources from SVN to be analysed with SonarQube

12,301

SonarQube will not fetch the source code by itself, the Project Links section is only meant for documentation.

The easiest way to have the source code from your repository analyzed periodically is to schedule analysis using a dedicated tool - e.g cron task, Windows scheduled task or even better, continuous integration server.

For instance, you can setup a Jenkins job to fetch source code from your SVN repository, build it, run automated tests and finally launch SonarQube Runner.

Share:
12,301
Eric Tobias
Author by

Eric Tobias

Updated on June 04, 2022

Comments

  • Eric Tobias
    Eric Tobias almost 2 years

    I am working on a project for which I would want to perform quality analysis. I have heard good things about SonarQube and wanted to try it. I have the following setup:

    SonarQube is installed along with Sonar Runner for Java on a server. It is configured and ready to go. I have my code residing locally on my machine and remotely on a SVN server distinct from the SonarQube host server.

    I am using Eclipse and have installed Sonar Eclipse. I would want to proceed with scheduled quality analysis on the server and work locally with previews using Sonar Eclipse. At the moment, my biggest problem is how to get my source files analysed by the Sonar Runner.

    As far as I read in the documentation, I would need to somehow get my code into the respective folder in the SonarQube Project folder, along with a configuration file. Is there no was to link the project to the remote source files?

    Looking at some of the documentation on links it would seem that this is possible. Yet I do not understand the differences between, for example, Sources and Developer connections.