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

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


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.


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.

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

Maven Scanner results can be uploaded to SonarCloud Server easily. Please find more details on this using the link http://total-qa.com/uploading-sonarlint-results-sonarqubecloud-server/

@total-qa What you are doing in the tutorial is running the maven scanner after running SonarLint. The scanner has nothing to do with SonarLint and you aren’t uploading SonarLint results to SonarCloud. It will do its own analysis and upload its own scan results to SonarCloud.
Since it might mislead some users, could you please correct the post?

1 Like