Configuring connecting mode in vscode with file

Please provide

  • Operating system: Windows 10
  • SonarLint plugin version: 3.21.0
  • Programming language you’re coding in: COBOL
  • Is connected mode used:
    • Connected to SonarQube (v 9.9):

In documentation you mention “Once a connection is established, SonarLint for VSCode tries to automatically detect a remote SonarQube or SonarCloud project to bind with the locally opened workspace folder. If the locally opened folder contains a or a file, SonarLint will try to configure the binding with the remote project defined in that configuration file.”

I first configured project bindings, and it registered configuration in settings.json.
I would prefer to configure project binding in file.
I tried several property lines, but it does not work. Can you explain me which lines I should put in the properties file ?

Thanks, regards.

Hello @Jean-Michel.Petit and welcome to the community!

For the file content we expect to have the following for the SonarQube project configuration:

And the following for the SonarCloud:


The project key can be found in the project information section on the project page


Clarification regarding the purpose of setting.json and files just in case.
The file is not used by SonarLint as a storage for configuration. It has data that may help SonarLint to bootstrap setting up the connection and binding.
But during setup, the actual configuration will be stored in settings.json. So if only contains information about the binding and not settings.json - binging is not configured.
If I understood you right and you don’t want to store the information about the binding and connection in the settings.json file, can you please elaborate on why?

Thanks. It works fine.

Cool. Good to here!
I’ve created a ticket to add these steps to a new article on the Connected Mode docs page.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.