SonarLint/SonarCloud configuration in a team scenario with Visual Studio

Apologies if I’ve missed this in the docs or a previous topic, but I wanted to check the SonarLint configuration in a team scenario with Visual Studio (against Azure DevOps). Specifically:

  • Presumably all team members need to connect SL to SC?
  • If so, should one person connect first and commit stuff to the repo and have the others pull it before the others connect?
  • What should be added to the repo? Everything apart from the .SonarLint folder or should some/all of that folder be added as well?

Thanks!

Cheers - Graham

Hello Graham,

The connection is specific to a solution – each solution has its own configuration, stored in the .sonarlint folder under the solution directory.

So to answer your first and second questions:
It’s enough that one person connects to SC and then commits the .sonarlint folder into the repo (as we do in SLVS as well). The other team members can then pull the changes, and if they have SonarLint installed, SL will read the configuration and pull the settings from the server. You can read more about it here.

Regarding additional files to commit: it depends on which languages you use and what is your project configuration (i.e. do you have custom rulesets? If so, we will add .ruleset files that contain your server quality profile and the existing project ruleset). You can read more about the files that we add here.

Please feel free to ask any additional questions.

Best,
Rita

That’s very clear Rita, many thanks!

1 Like

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