Support third-party analyzers in SonarLint

I wrote a custom Sonar server plugin to analyze files containing our internally developed DSL code.

I would like to be able to use SonarLint to analyze these files too. From what I can see SonarLint currently only supports Java, PHP, Python and Javascript plugins.

Looking at the code for the IntelliJ SonarLint plugin and core project it seems that I will have to add our custom plugin to the sqplugins in the build.gradle of the IntelliJ SonarLint plugin and the plugin key to the whitelist in the core project. However, there is probably a lot more that will have to happen to get it to work. Also, this is a pretty hacky solution.

I would therefore like to suggest a feature where one would be able to dynamically add plugins to SonarLint. The way I envision this working would be, for example in the IntelliJ plugin, be able to specify the additional custom sonar plugin jar files as either local files or as artifactory URLs. This would be done in the SonarLint General Settings preference panel.

Not only the IntelliJ SonarLint plugin - same feature need in VScode and Eclipse

Is this feature available now?

Hello @Manjula_Dissanayake and welcome to the SonarSource community!
Third party analyzers are not supported in SonarLint (see also in the SonarLint FAQ page), and we currently do not have any short or mid term plan to support them.
Among the reasons for that, bear in mind that supporting non-SonarSource analyzers in SonarLint implies coping with support and performance issues related to those analyzers that we do not control. As SonarLint focus is on-the-fly analysis, performance is a very important aspect that we cannot underestimate, and many analyzers are not necessarily optimized for such use case.
On the other hand, we are tracking community requests, including the current thread of course, thus we may re-evaluate our position in the future should we see a strong demand from our users.

1 Like