Sonarcloud Server Id impossible to find

sonarlint
vscode

(Matthieu Labarrière) #1

Hi there,

I’m trying to setup SonarLint in VS Code. I need to put the “Server Id”, which I’m not able to find in our sonarcloud.
Can someone give me a hand an point me in the right direction?

Thanks,
Matthieu


(Nicolas Bontoux) #2

Hi Matthieu,

Looking at the setting documentation in VS Code:

  // Configure the connection(s) to SonarQube/SonarCloud in your USER settings.
  // For security reasons, the token should not be stored in SCM with workspace settings
  // "sonarlint.connectedMode.servers": [
  //     {
  //        "serverId": "my_orga_in_sonarcloud.io", // Connection identifier
  //        "serverUrl": "https://sonarcloud.io",   // SonarQube/SonarCloud URL - https//sonarcloud.io for SonarCloud
  //        "organizationKey": "my_organization",   // Organization key in SonarCloud only
  //        "token": "V2VkIE1heSAyMyAwODowOTozMiBDRVNUIDIwMTgK"    // User token - generated in SonarQube/SonarCloud in My Account>Security
  //     }
  // ],
  "sonarlint.connectedMode.servers": [],

The serverId is a property that you have to define, to uniquely identify this connected server, allowing you to specify the right one in sonarlint.connectedMode.project. Makes sense ?