Search code examples
sonarqubesonarqube5.6

SonarQube - How to import xml report into SonarQube database?


I have one XML file that contains a list of issues reported by my analyser. I want to import those issues into SonarQube database so that it gets reflected on SonarQube dashboard. My SonarQube version is 5.6.3. Is there any such API available in Sonar?


Solution

  • You'll have to write a custom plugin to import the issues from your XML file.

    To do that you'll use API's. There is a rudimentary developer's guide. With questions beyond the scope of that guide you should consult the SonarQube Google Group.

    To answer the question posed in your comment, you should under no circumstances attempt to fiddle directly with the database. You must treat the database as a black box, not least because its structure is apt to change without warning from version to version of the platform.

    EDIT

    The SonarQube Google Group has been closed, and the community moved here: https://community.sonarsource.com/