SonarQube for VS Code plugin version: 4.35.1 (Current)
Programming language you’re coding in: Java, Go, etc.
Is connected mode used: SonarQube Server for DataCenter
And a thorough description of the problem / question:
We are attempting to roll out SonarQube for IDE to my team. My project is made up of about a dozen GitHub Enterprise repositories, all of which are analyzed by SonarQube during our CI/CD pipeline builds.
When using the IDE plugin to work with our code, the plugin works fine. However, some of my developers also work with large repositories for other projects that are NOT managed by SonarQube Server, so when opening those workspaces, the plugin is in “Standalone” mode. My developers would like to be able to disable the plugin analysis for those disconnected repositories. I’ve found sonarlint.analysisExcludesStandalonebut that appears to apply to files or directories within an open workspace. What they’d like to do is disable the plugin for the entire repository. (e.g. ../workspaces/MyRESTfulService). Is there a way to do that?
I don’t think there’s a way to do this. Would you mind sharing why you wouldn’t want the benefit of on-the-fly static analysis in those repos even if you’re not analyzing the full project yet? Is this about performance? Something else?
Thanks for responding. Within my company, different teams use different tools for SAST. The developers on my team that I’m getting this request from are also opening other project repositories for another product that are HUGE. What they are telling me is that when they open these projects in VS Code that it spikes the CPU and appears to create all sorts of files that are not directly relevant to that particular product and overlap with other tools that they are required to use.
So I think this is just a case of source code analysis overload. . Does that help?
I don’t know whether that might help or not. How would you invision using it to disable analysis of selected projects? Or, maybe the inverse: If that setting was unchecked, how would you selectively enable workspaces? Could it set to automatically enable itself whenever there is a .sonarlint file in the root directory?
@johnkgerken for now you would have to simply click the “ SonarQube” item in the status bar to turn analysis on/off per-project. For future, we could adjust the setting to be configurable per workspace as well. Since it’s a feature request it would have to be properly prioritized first though