首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >StyleCop :警告未被抑制

StyleCop :警告未被抑制
EN

Stack Overflow用户
提问于 2018-12-11 14:42:49
回答 1查看 161关注 0票数 0

我正在做一个已经引入了样式cop规则集的项目。规则集包含将禁止来自项目的警告的规则。

即使已经定义了规则集,警告也会显示在“警告列表”选项卡中。

我的问题是我在这里错过了什么?或如何抑制..DotSetting中提到的所有警告。

以下是.DotSetting文件中的代码

代码语言:javascript
复制
<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>

如果我在这里遗漏了什么或错了,请纠正我。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-12-11 15:04:03

我使用Settings.StyleCop文件。您可以使用Stylecop插件为VS轻松地配置它。

右键单击特定项目-> StylecopSettings

然后,可以在“警告”选项卡中选择要跳过的规则。

它通过项目生成Settings.StyleCop文件。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53726520

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档