Run SonarQube server scan from within Eclipse?

Hello,
I am running the latest version of SonarQube community in Docker and have Eclipse running with the latest 11.3 plugin.

I created the connection between my local Eclipse install and the server and can see the bindings, although I mis-labeled the binding branch to main where the git it pulls from is master.

I can run an Analyze from Eclipse and it does the local analyze and provides a report in Eclipse, but nothing happens with the SonarQube server.

When I check the server it doesn’t show any activity and gives me instructions to run the sonar-scanner.bat against the project sources:

sonar-scanner.bat -D"sonar.projectKey=Eclipse_Workspace" -D"sonar.sources=." -D"sonar.host.url=http://192.168.2.16:9000" -D"sonar.token=squ_xxxxx"

While I could do this, this seems odd to me that the Eclipse Plugin would not run this scan on the project source it is analyzing using the connection binding information it has.

Am I missing something or is this the only way to get the server to scan a local Eclipse project along-side the local Analysis? Why would you need to bind Eclipse to the server if it doesn’t do anything with it.

Thanks in advance.
Nathan

Hi Nathan,

SonarQube for Eclipse (and all the other flavors of SonarQube for IDE) only runs local, in-IDE analysis of the files you’re working on.

If you want a full analysis of the project to show up in SonarQube, then yes, you’ll need to run that separately, ideally from your centralized CI system, pointed at a centralized SonarQube instance.

The point of connected mode is not to trigger full analysis from your IDE, but to import the settings and issue statuses from the centralized server that the whole team is using.

 
HTH,
Ann