Reputation: 1176
I installed SonarLint in VS 2015 and it looks like a great extension with lots of potential.
At the moment the extension is also analysing my test projects and giving warnings about this. How can I disable inspection of specific (test) projects?
Update Its not about disabling specific Sonar rules or projects in SonarQube, but its about the Visual Studio extension SonarLint.
Upvotes: 9
Views: 17760
Reputation: 114511
In Visual Studio, open the project and then dig into the Reference section. There choose to edit the active rule set:
In the screen that opens select/deselect the rules you want for the specific project. Then hit save. This will most likely create a new .ruleset
file in your project and instruct Roslyn to use that instead of the standard set.
The result is that the project file is updated with the <CodeAnalysisRuleSet>
tag like this:
<CodeAnalysisRuleSet>UnitTests.Core.ruleset</CodeAnalysisRuleSet>
You can also use the add new file wizard and pick the "Code Analysis Rule set" option:
Then from the Analyze menu select "Configure Code Analysis for Solution", your newly added rule set can be selected from there and assigned to the project you want:
Upvotes: 8