visual-studio - 何时使用 `silent` 代码分析严重性?

标签 visual-studio code-analysis roslyn-code-analysis

分析器反馈严重级别为 explained in the documentation .但在我眼里silentnone严重性级别似乎都具有相同的含义 - “我不希望检查此规则”:

对于 none :

Suppressed completely.



对于 silent :

Non-visible to user. The diagnostic is reported to the IDE diagnostic engine, however.



VS2019“上报IDE”到底有什么作用,在什么场景下更喜欢silentnone ?

最佳答案

我想silent在编辑器中显示为“三个点”或幻影文本,而 none没有出现。我可能记得这在过去并不一致,但它似乎发生在 Visual Studio 16.10.0 中。我喜欢 Imre's suggestions .
enter image description here
这好像是:

  • suggestion , error , 和 warning显示在编辑器和错误列表中。
  • silent仅在编辑器中显示。
  • none两者都没有出现。
  • 关于visual-studio - 何时使用 `silent` 代码分析严重性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58914726/

    相关文章:

    c# - Visual Studio ADO .NET 无法连接到 mysql 数据库

    c# - 接口(interface)和类继承。这是一个可以避免的模式吗?

    visual-studio-2019 - InvalidProjectFileException : "The SDK ' Microsoft. NET.Sdk.Web' not found"from Microsoft.Build.Evaluation.Project 升级到 VS2019 后

    MSBuildWorkspace 无法将带有 <ProjectReference> 的项目编译到另一个项目

    visual-studio - VS 中的 typescript 调试不适用于 Aurelia JSPM 设置

    python - pip 可以与 Visual Studio 中的 Python 工具一起使用吗?

    visual-studio - 在授权 header visual studio 2013 负载测试中向变量添加文本

    c# - 为什么 "Analyze designer files"是 StyleCop 的默认值?

    c++ - eclipse cdt的代码分析不懂虚继承

    c# - 现在有没有一种简单的方法可以将 C# 中的任何特定方法/属性列入黑名单?