visual-studio - Visual Studio 中的 "Suggestion"和 "Refactoring Only"有什么区别?

标签 visual-studio editorconfig

我正在为我的项目构建 .editorconfig。对于几个选项,我同时看到“建议”和“仅重构”。这些有什么区别?

最佳答案

来自documentation

违反建议会在 Visual Studio IDE 中显示为构建消息和建议;请参阅错误列表中的消息部分。

enter image description here


Silent 的描述仅适用于重构,因为它将按原样保存在 .editorconfig 中,例如:

dotnet_naming_rule.interface_should_be_begins_with_i.severity = silent

用户看不到违反仅重构/静默规则的行为,但快速操作和重构...菜单显示解决违规问题的条目(与建议违规情况类似)。

Microsoft Visual Studio 文档的已解决问题 GitHub说:

Do not show anything to the user when this rule is violated. Code generation features generate code in this style, however. Rules with silent severity participate in cleanup and appear in the Quick Actions and Refactorings menu.

关于visual-studio - Visual Studio 中的 "Suggestion"和 "Refactoring Only"有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70099023/

相关文章:

visual-studio - Visual Studio&源代码控制: How to have shared code?

visual-studio - 如何在不更改每个子图像的情况下更改 MFC 应用程序的图标?

c# - 配置 .editorconfig 中缺少 xml 注释的警告 (Visual Studio 2019)

c# - 在 Visual Studio 2022 中应用代码样式

c# - editorconfig - 如何为只读私有(private)字段指定下划线前缀?

Editorconfig:如何自动修复项目中的所有文件

c# - 如何从数组中获取最后一个值

c++ - 无法在用 C++ 编写的 UWP 上使用 SQLite 打开数据库

visual-studio - 自动删除旧的 IntelliTrace 记录

html - VS 代码的 EditorConfig 不起作用