Sonarlint proxy configuration for VS code

Please provide

  • Operating system: Windows
  • SonarLint plugin version: 3.12.0
  • Programming language you’re coding in: Python
  • Is connected mode used: wanted to configure it.
    • Connected to SonarCloud or SonarQube (and which version):

And a thorough description of the problem / question:

I have installed sonarlint plugin in VS code for python project, I wanted to enable connected mode with SonarQube. I wanted to know where can I input our SonarQube instance proxy settings to Sonarlint plugin in VS code editor. For pycharm I managed to configure and its working fine. For VS code alone I need your help to input the proxy settings

Hey @vikraman_arut, welcome to the Sonar Community! :sonar: :wave:

Unfortunately, currently, it is not possible to set up a Connected Mode with a server that is behind a proxy out-of-the-box. We do have a ticket for this in our backlog. In the meantime, you could try the following workaround by using JVM’s standard proxy settings through the appropriate VSCode settings, e.g:

{ "sonarlint.ls.vmargs": "-Dhttps.proxyHost=my-proxy.company.tld -Dhttps.proxyPort=8080 -Dhttps.nonProxyHosts=localhost|127.0.0.1|my-intranet.company.tld" }

Hope this clarifies,
Sophio

Should I update this in settings.json file, and is there syntax error in the above code shared by you?

Yes, you can put it in the user settings. You will also be able to directly update the settings from the VSCode UI: Settings > Extensions > SonarLint > Ls: Vmargs

Best,
Sophio