Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sonar Lint Ruleset files: Gitignore?

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?

like image 901
devlord Avatar asked Jun 18 '16 21:06

devlord


1 Answers

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.

like image 180
Bogdan Gavril MSFT Avatar answered Oct 02 '22 04:10

Bogdan Gavril MSFT