SonarQube Exporting a Parseable Results File

Hello,

I was wondering if there was a way to export the results of the SonarQube analysis with the defects detected to a file format that can be read by a human to determine the validity of the defect it flagged

Hey there.

Why not have the human go directly to SonarQube?

I understand that SonarQube has a web component that shows the results of the analysis but what about AI that would need to read the content? Would there be a way to export a file of some sort it order to do this?

You may be interested in the Web API to export data (documentation always linked in the footer of your instance) – as well as this guide:

Would this process export a JSON or HTML file?

Using the Web API allows you to retrieve JSON, which you can then do with what you wish (process further, convert to another format)

Thanks so much Colin! Do you know where I could find examples of a SonarQube analysis with data on the internet? Or a code sample that I could run an analysis on my own?

SonarSource/sonar-scanning-examples is probably a good place to start.