I want to upload Sonarlint's reports to Sonar Qube Server, and check reports on Web

eclipse
sonarlint
sonarqube

(A Young Lee) #1

I want to upload Sonarlint’s reports to Sonar SonarQube, and check reports on Web.

I connected the server in Eclipse, and the project binding was successful.
But how do I upload the next report to the server?

SonarQube: v 6.7.4, localhost
Sonar Lint: v3.5.0 at Eclipse Neon3


(Janos Gyerik) #2

Hi,

SonarLint doesn’t work that way. SonarLint doesn’t upload any reports to SonarQube. Instead, it shows analysis results in your IDE.

To upload reports to SonarQube you need to use a Scanner. There are specialized scanners for each build system, such as Maven, Gradle, etc. Take a look around here.

Cheers,
Janos


(A Young Lee) #3

So the only way to upload reports to SonarQube is to have a Sonar - Scanner.
Thank you :)…
I hope someday the ability to upload from SonarLint will be available.


(Nicolas Bontoux) #4

This is unlikely to be implemented, and to understand the reasoning here you need to step back a bit:

  • SonarQube is meant to do continuous inspection consistently over the shared codebase, as it evolves over time (commits pushed and built/tested/analyzed in CI)
  • code on the developer workspace is not necessary committed, so pushing that to SonarQube means cluttering the centralized project, with the risk of breaking the Quality Gate for code that is actually not pushed yet, and altogether it would cause SonarQube reports and historical trends to be unreliable (if not completely broken)
  • hence SonarLint to analyze local changes, whereas SonarQube focuses on the code that made it to the central repository