Using SonarLint 220.127.116.11839 for Visual Studio 2019.
We import our ruleset by adding a NuGet package. When adding SonarLint this ruleset is referred to directly where it is downloaded in the user home folder (.nuget subfolder structure). This means that we either need to change how we distribute our coding standards (ruleset) or each time someone opens the project the project ruleset is (supposedly) changed. It also means that people who don’t use SonarLint have every linting rule under the sun enabled.
Neither of these options are workable.
The project ruleset create by SonarLint looks like this (Company removed):
<?xml version="1.0" encoding="utf-8"?> <RuleSet Name="SonarQube - SonarLintExample [..]" ToolsVersion="16.0"> <Include Path="..\.sonarlint\devopstest_[..]_sonarlintcsharp.ruleset" Action="Default" /> <Include Path="c:\users\Mark\.nuget\packages\[..].developmentstandards.csharp\18.104.22.168\build\\..\ruleset\stylecop.analyzers.extensions.ruleset" Action="Default" /> </RuleSet>