Importing External Issues

external_issues

(Jason Hoover) #1

Using SonarQube 7.3 and the latest download of sonar-scanner, how does one import external issues? As a sanity check I’m attempting to import the example generic issue json for Generic Issue Data

My sonar-project.properties file contains this:

sonar.host.url=http://localhost:9000
sonar.projectKey=abc123321
sonar.projectName=PLEASE_WORK
sonar.projectVersion=1.0
sonar.sources=SonarQubeIssueData.json
sonar.externalIssuesReportPaths=SonarQubeIssueData.json
sonar.issuesReport.json.enable=true
sonar.log.level=TRACE
sonar.verbose=true
sonar.showProfiling=true

The SonarQubeIssueData.json file contains the json from Generic Issue Data

I then execute from the same directory containing the above properties file:
sonar-scanner -X

I see that something is happening in the SonarQube log. And the sonar-scanner log reports a success:
12:57:20.512 INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=abc123321

However, none of the external issues show in the SonarQube web console.

What am I missing?


(Nicolas Bontoux) #2

Hi Jason,

Did you adapt the filepaths so that they correspond to actual files that are being scanned by SonarQube ? SonarQube will import the external issue(s) only if they relate to source file(s) that’s actually been analyzed (and which can then be browsed in SQ).


(Jason Hoover) #3

Woops! That solved it. Thank you!


(Frédéric Depale) #4

Hi,
Is it possible to use the properties “sonar.externalIssuesReportPaths” with SonarQube 6.7.3
Best regards,
Frédéric Depale


(Nicolas Bontoux) #5

Nope, this capability was introduced and announced in SonarQube 7.2.


(Frédéric Depale) #6

Thanks a lot !