How to import external issues only on Sonarqube?

Hello,

I have a use case where I have to send issues to sonarqube from another tool.
So I generate a json with the data I want to send and I use this command:

sonar-scanner -Dsonar.externalIssuesReportPaths=myissues.json

My problem is that as soon as I run this command all my repo is scanned in addition to sending my external issues to my sonarqube.
So I would like to know if there is a way or an option to only send the issues stored in my json file without scanning all my repo.

My sonarqube version is the Enterprise Edition Version 9.3

Sorry if this question has already been answered.

Regards

Hi,

Welcome to the community!

There’s no way to update an analysis with “late breaking” information. The only way to get these extra issues into SonarQube is to feed in your report during analysis - which is always going to be a full analysis.

 
HTH,
Ann

Hello Ann,

Thanks for the answer, but after few day of research there is an option to do this.

I can use the option -Dsonar.sources=myissues.json to force sonar-scanner to only scan this file and not the all repository.

Regards,

Thomas

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.