Can I add more language support in sonarlint?

Hi, as I can see from the sonarlint.org the language support is limited:
eclipse:

  • Java
  • JavaScript
  • PHP
  • Python

intellij:

  • Java
  • JavaScript
  • Python
  • Kotlin
  • Ruby
  • PHP

vscode:

  • JavaScript
  • TypeScript
  • HTML
  • PHP
  • Python

Can I add golang support? How to do it?

1 Like

Hi,

no, you can’t. Enabling more analyzers for Sonarlint has to be done by Sonarlint Dev team.
E.g. the upcoming release 4.2 of Sonarlint for Eclipse will bring HTML support,
see https://jira.sonarsource.com/browse/SLE-302

Regards,
Gilbert

1 Like

To be precise, the languages you listed are the one available out of the box with SonarLint alone. When you connect SonarLint with your SonarQube server or with SonarCloud, most SonarSource analyzers installed on the server will be downloaded and used by SonarLint.

But currently SonarGo is not supported by SonarLint.

Good to know.
In our project we use java & go.

Out of curiosity, what is the IDE you are using?

intellij series for most people, eclipse for some of java developer

Actually for golang it’s not too much rules, because it’s a restraint language, which is a good thing. go fmt & go vet do the job well. On the other hand, java and cobol have many rules, that’s bad.

Hi @Julien_HENRY

yes, of course, forgot to mention.
When connected to Sonarqube there are more plugins available, Sonarlint console has something like:

Downloaded plugin list in 96ms
Code analyzer 'scmgit' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'jacoco' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'ldap' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'softvis3d' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'csharp' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'cssfamily' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'flex' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'go' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'swift' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'vbnet' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'vb' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'scmsvn' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'security' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'securitycsharpfrontend' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'securityjavafrontend' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'securityphpfrontend' is not compatible with SonarLint. Skip downloading it.
[...]
Load plugins
Load plugins (done) | time=123ms
Plugins:
  * SonarCFamily 6.1.0.11021 (cpp)
  * SonarPython 1.13.0.2922 (python)
  * SonarKotlin 1.5.0.315 (kotlin)
  * SonarRPG 2.3.0.1187 (rpg)
  * SonarPLI 1.9.0.1349 (pli)
  * SonarTSQL 1.3.1.3067 (tsql)
  * SonarApex 1.5.0.315 (sonarapex)
  * SonarJS 5.1.1.7506 (javascript)
  * SonarPLSQL 3.4.1.2576 (plsql)
  * SonarRuby 1.5.0.315 (ruby)
  * SonarScala 1.5.0.315 (sonarscala)
  * License for SonarLint 7.7 (license)
  * SonarJava 5.12.1.17771 (java)
  * SonarCOBOL 4.4.0.3403 (cobol)
  * xxx Java Custom Rules 1.0.7 (javacustomrules)
  * SonarHTML 3.1.0.1615 (web)
  * SonarXML 2.0.1.2020 (xml)
  * SonarPHP 3.0.0.4537 (php)
  * SonarTS 1.9.0.3766 (typescript)
  * SonarABAP 3.7.1.1762 (abap)

What are the criterias for a language analyzer plugin to be compatible for Sonarlint ?

Regards,
Gilbert

The general rule is that we want to be in full control of how the analyzer behave, for various reasons, like performance and user experience, but also to not have constraints of a SonarLint specific API.
Concretely, it means we are currently restricting to:

  • SonarSource analyzers (no community plugin)
  • Rules developed using our own technology: for example SonarPython in SonarQube has some rules based on PyLint. Those rules will not be executed in SonarLint.