sonarlintsonarlint-vs

sonarlint rules appear in error list, but no ruleset file found


I have a project in Visual Studio 2015 Update 2 with SonarLint 2.1 installed. I'm seeing the sonarlint rules in the Error List as expected, but I want to disable a rule. I tried to view the project's active ruleset, as explained here: Can I configure the used ruleset for SonarLint However, when I click Open Active Rule Set, I get an error message saying "The rule set file could not be opened. No rule set file is specified, or the file does not exist." Where are the SonarLint rules coming from? How do I create a local ruleset?


Solution

  • This problem is most probably not related to SonarLint. I managed to reproduce your issue by editing the project file manually, and putting incorrect path value into the CodeAnalysisRuleSet property. By removing the value, and reloading the project the RuleSet editor window shows up with the default rule severities and enablement.

    Note, the CodeAnalysisRuleSet property is most probably set for all your build configurations separately, so you might need to edit the .csproj file at multiple places.