简体   繁体   English

StyleCop:警告未取消

[英]StyleCop : Warning not suppressed

I am working on a project in which style cop rule set is already introduced. 我正在一个已经引入了样式警察规则集的项目中。 Rule set contains rules which will suppress warnings from project. 规则集包含将禁止项目警告的规则。

Even if rule set is already defined, warnings are displayed in Warning list tab. 即使已经定义了规则集,警告也会显示在“警告列表”选项卡中。

在此处输入图片说明

My question is what I am missing here? 我的问题是我在这里想念的是什么? or how to suppress all warning which are mentioned in . 或如何禁止中提到的所有警告。 .DotSetting . .DotSetting

Here is the code from .DotSetting file 这是.DotSetting文件中的代码

<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
    <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeThisQualifier/@EntryIndexedValue">DO_NOT_SHOW</s:String>
    <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StyleCop_002ESA1101/@EntryIndexedValue">DO_NOT_SHOW</s:String>
    <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StyleCop_002ESA1126/@EntryIndexedValue">DO_NOT_SHOW</s:String>
    <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StyleCop_002ESA1200/@EntryIndexedValue">DO_NOT_SHOW</s:String>
    <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StyleCop_002ESA1623/@EntryIndexedValue">DO_NOT_SHOW</s:String>
    <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StyleCop_002ESA1633/@EntryIndexedValue">DO_NOT_SHOW</s:String>
    <s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=StyleCop_002ESA1126/@EntryIndexedValue">DO_NOT_SHOW</s:String>
</wpf:ResourceDictionary>

Please correct me if I missed something or wrong here 如果我错过了什么或错了,请纠正我

I use Settings.StyleCop file. 我使用Settings.StyleCop文件。 You can configure it easily with Stylecop plugin for VS. 您可以使用VS的Stylecop插件轻松配置它。

Right click on the specific project -> StylecopSettings 右键单击特定项目-> StylecopSettings

在此处输入图片说明

You can choose then what rules you want to skip in the warnings tab 您可以在“警告”标签中选择要跳过的规则

在此处输入图片说明

That generates a Settings.StyleCop file by Project. 这将通过Project生成Settings.StyleCop文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM