Is connected mode used: Yes with SonarQube server 10.8
SonarQube Cloud, SonarQube Server, or SonarQube Community Build? (if one of the latter two, which version?):
And a thorough description of the problem / question:
SonarQube for IDE is scanning all the files in the project for issues instead of just the open ones. This is causing performance issues. Updating and Re-installing SonarLint did not work.
SonarQube for IDE analyzes all files that are open in the editor. To achieve this, we rely on the textDocument/didOpen notifications sent from the IDE to our language server. Based on your logs, I am almost sure that one of the extensions (possibly an APEX-specific VS Code extension) is triggering such didOpen events for all (or a certain subset of) .cls files in your project. SonarQube for IDE tries to double-check whether these files are actually open or not, and that’s why there are a lot of log lines saying the analysis will be skipped for files not open in the editor. Unfortunately, we currently don’t have a 100% precise heuristic to determine whether the file is actually open in the editor or not.
To double-check this, you could drop "sonarlint.trace.server": "verbose" line in your VS Code USER settings file, restart VS Code and observe textDocument/didOpen events appearing in the logs.
TL;DR; What we are actively working on (literally as we speak) is improving the performance of analysis. You should be seeing continuous improvements in the upcoming versions.
Apologies for the delayed reply. Most of the users in our org uses the Salesforce Agentforce plugin. When we disable the Agentforce plugin it is working as intended. This is however a temporary fix as Agentforce is essential for the process we are following.
Thanks for getting back to us. Indeed, that is totally understandable.
On our side, we have made some meaningful improvements to analysis performance and are currently vigorously testing the changes before we ship them. I will update this thread once the improvements have been released.
@yadhu, downgrade the salesforce Agentforce version to 1.2.0 for now in Vscode … its working in that version with Sonar … without any issues … untill we get the new sonar version. for me its working (workaround)… let me know for you if this works .
The latest version shipped with the first round of improvements. We are working on further performance improvements and changes to the way we schedule/trigger analyses.
We appreciate your patience and the time you took to share the feedback with us. We don’t take it for granted