- 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 sonar-project.properties or a .sonarcloud.properties 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 sonar-project.properties file.
I tried several property lines, but it does not work. Can you explain me which lines I should put in the properties file ?
Hello @Jean-Michel.Petit and welcome to the community!
sonar-project.properties 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
sonar-project.properties files just in case.
sonar-project.properties 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
sonar-project.properties 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?
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.