I have a CSV report which was generated by third party analyzers and want to import them into the Sonarqube. How to convert that into a specific format to be able to import into Sonarqube?
I see that there is a link that states we need to have in generic issue format and do we need to convert our CSV columns and its values to JSON format?
If I convert the CSV to JSON with any converters, will we be able to import them into Sonarqube directly? or should It have the similar keys mentioned in the Import format (engid, ruleid, primary location, type, severity)?
Please suggest me a better method.
Yes, your report will need to be converted to the Generic Issue Format to be imported during analysis.
And, we really wouldn’t recommend importing them into SonarQube if this list isn’t being continually updated (i.e. if the third-party analyzers aren’t running during each build and producing a fresh report). The results will otherwise become stale (or cause an analysis failure, if a line in the report ceases to exist).
Keep in mind that SonarQube also supports a number of third-party analyzer report formats natively.
Do we need to have the same keys as mentioned in the generic issue format?
I have a CSV file with different columns name and can we use those column name as keys? or else do we need to have the same keys with the values of the keys of the CSV file?
Yes, they must match exactly, although you can omit the fields mentioned as “optional” if they aren’t relevant.
Thank you for ur response.