SonarLint does not show any results on apex files


(Dave) #1

Hello Friends, I have installed sonarlint plugin for Intellij Idea IDE and connected it to sonarqube server.
The connection was successful and I was able to select the required project.
But when I analyze a code file with sonarlint, it does not show any errors.

I was hoping to see same issues as I see on sonarqube website.

I am trying to analyze salesforce (apex) files with sonarlint. I did not find a place to configure rules for apex, so I am assuming sonarlint will use rules/configurations from the sonarqube server itself.

What am I missing here ?


(Nicolas Bontoux) #2

Hi Dave,

I believe this might just be a misunderstanding. SonarLint for IntelliJ only supports (as of this writing) Java, JavaScript, PHP and Python. Connecting that to SonarQube allows to have rules, issues and exclusions synched, however by no means does it open the door to other analyzers kicking in in SonarLint (in-IDE execution provides a number of strong constraints compared to a normal SonarQube scan, only SonarLint built-in analyzers are optimised for that). That explains why your apex files are not analyzed in SonarLint.

(Dave) #3

Thanks Nico, so sonarlint will not support apex (salesforce ) code ? But our sonarqube server does support apex.

(Nicolas Bontoux) #4

Hi Dave,

You should really see SonarQube and SonarLint as separate products indeed. There definitely is some synergy between both when using Connected Mode, however by no means does SonarLint intend to cover extensions and 3rd party analyzers similarly than SonarQube does (both products are really designed differently, with different intents). is the best place to check-out what SonarLint (and its various IDE flavours) currently supports.