SonarQube scan for Salesforce Apex classes

Must-share information (formatted with Markdown):

  • SonarQube 7.3
  • We are running SonarQube Scan in our Azure pipelines for Salesforce. We are using Ant tool to deploy Salesforce.
  • We are currently running SonarQube code scan with the standard rules for Javascript. However there are certain rules that are not applicable for Salesforce lightnening components.
  • What are the recommendations to run SonarQube scan for Salesforce ?

Hi,

Check this page https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/
There you can find info on how to disable certain rules on certain files.
If some rules are not applicable to any of your files, consider creating a custom rule profile with those rules disabled.