We'd like to use SonarQube/SonarLint on a rather huge C# solution with around 40 projects (C++ solutions hopefully to come later on). However, we are struggling with VS integration. The issue is as follows:
- We've defined a Quality Profile on the SonarQube server and bound our solution to that profile. As a result, SonarLint receives the profile as a
.ruleset
solution file, and creates a bunch of files:- The binding configuration (
.sqconfig
) (folder<solution dir>/SonarQube
) - The solution ruleset (folder
<solution dir>/SonarQube
) - The project ruleset files (one for each project folder) which allow to adjust the solution ruleset on project level (great and (for us) important feature)
- The binding configuration (
- Now, we'd like to share our binding and rulesets accross our development team. Thus, we have checked in all the above files. However, this has a significant disadvantage: Each time SonarLint receives changes of the Quality Profile from the SonarQube server, we have a bunch of outgoing changes. Investigating those changes implies that most (if not all) files have not changed at all, but seem to only have been touched. This is a showstopper for us, since we do not want to deal with a "polluted" list of outgoing changes on a regular base.
- Note that this can be reproduced rather easily:
- Bind solution to quality profile
- Check-in all new and changed files
- Right-click on SonarQube connection, select Update
- => All ruleset files created by binding the solution are marked as outgoing changes (and none contains any actual changes), refreshing the Team Explorer view doesn't help
- Note that this can be reproduced rather easily:
- Therefore, we thought that we could exclude all SonarLint created files from TFS. This (to my understanding) should be fine for the solution ruleset (since that ruleset is synchronized with the SonarQube server automatically), and we could live with having each developer take care of the solution binding once for himself/herself. However, since it appears to not be possible to adjust Quality Profiles on the SonarQube server with respect to VS projects, we would loose the ability to use VS project specific rulesets (or would have to copy them around manually).
Thus, my question is: What are best practices for sharing SonarQube rulesets accross development teams when using SonarLint and TFS as version control system?