Dynamically add sonar plugins to SonarLint (beyond the default Java, PHP, Python and Javascript plugins)

(Rudolf Visagie) #1

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.

Adding custom plugin to SonarLint
(Alexey Lustin) #2

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