Can I configure the used ruleset for SonarLint

雨燕双飞 提交于 2019-12-01 03:47:14

问题


Can I disable / enable the set of rules that are shown by SonarLint for VS? How? A similar question was already asked in Is there some graphical way to create my own configuration file on SonarLint? but I wasn't able to follow the answer, i.e. did not find the Project/References/Analyzers node in the Solution Explorer, to be able to edit the active rule set file. Can you help me out on this one?


回答1:


Here is how to open the active rule set of a project:

From there, you'll be able to enable and disable rules:

The path to the rule set file to be used is saved within your .csproj file under the <CodeAnalysisRuleSet>...</CodeAnalysisRuleSet> tag. You can reference the same rule set file from multiple projects, and store the rule set along with your project sources in Git / TFVC if you'd like all developers to share the same rule set.



来源:https://stackoverflow.com/questions/33081197/can-i-configure-the-used-ruleset-for-sonarlint

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!