SonarLint integration with SonarQube for Scala question

Hello.

My team has been using SonarQube for our Scala project for a while now and I find it very useful. Now we would also like to integrate SonarLint to improve our development quality. From what I learnt SonarLint for IntelliJ does not support Scala code analysis natively but it should work after connecting it to our SonarQube server instance (according to official webpage https://www.sonarlint.org/intellij).

My question is if SonarLint plugin after connecting to our SonarQube server will download its set of Scala rules and perform each analysis offline or will it delegate analysis to our SonarQube server and wait for its response? Is integration with SonarQube used only to get set of rules/quality profiles or is it necessary to run Scala analysis because SonarLint cannot perform it locally by itself?

Hello, welcome to the community! And thank you for your questions.

The SonarLint product website has a page that describes the benefits from connected mode, and technically it boils down to this:

  • Code analyzers and quality profiles are synchronized with the SonarQube server, so for Scala you get the exact same rules as on the server (this is not true for all languages)
  • Analysis is still performed locally on each developer’s box, using the content available to the IDE, for a tighter feedback loop
  • Issues marked as “false positive” or “won’t fix” on server side are also considered as such in the IDE and will be removed from the analysis results

I honestly can’t remember why the Scala analyzer is not packed with SonarLint by default :slight_smile: maybe this is something we could consider in the future.

1 Like

Thanks for your explanation, now its all clear :slight_smile:

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