In our Jenkins pipeline, we have a step for Sonar analysis (configured with QualityGate profiles) and the current process is:

Sonar scanner runs as part of the pipeline step and initiates a task Wait for task to complete (https://mycompany.sonarqube.com/api/ce/task?id=AV8Jfnt0WkeTJL_PsTCU) Fetch the corresponding AnalysisID for the above task (by doing 'GET' on above URL) Doing a 'GET' on the analysis-ID URL shows the metrics of violations ( https://mycompany.sonarqube.com/api/qualitygates/project_status?analysisId=ANALYSIS_ID )

What we ideally want is to get the list of files which are causing these violations. I am not able to locate any API which gives this information.

Any idea how we can get the list of source-code files causing violations?


Browse other questions tagged or ask your own question.