I installed SonarLint and hooked it up to our server in Visual Studio, and when I did git status
it showed all these net .ruleset
files. Should I put this extension in the .gitignore
file or add them to the repo?
TLDR; Commit them to share them with your team.
.ruleset files are collections of rules and their status (enabled, disabled, severity). When you bind your solution to SonarQube two things happen:
a. analyzers are installed to your projects as nuget packages (this is how .net analyzers work btw, you install them just like a reference). There is no other way to install analyzers and this is why your csproj are dirtied.
b. ruleset files are created to match the quality profile from the SQ server (the analyzers usually enable all their rules, but the SonarQube quality profile disables some of them and assigns different severities).
If you commit the changes, when your colleagues do a git pull
all they have to do is build and the analyzer nuget packages will be installed. So they don't need to have the SonarLint plugin installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With