[英]rule dotnet_style_namespace_match_folder doesn't work
我的编辑配置
# top-most EditorConfig file, hierarchy search will stop in this file
root = true
# ----------------------------------------------------------------------------------------------------------------------
# Coding styles
# ----------------------------------------------------------------------------------------------------------------------
# Dotnet code style settings:
[*.{cs,vb}]
dotnet_diagnostic.IDE0055.severity = error
dotnet_style_namespace_match_folder = true:error
Class 我测试反对。 命名空间应与结构匹配并等于ConsoleApp1
namespace ConsoleApp1.NotHere
{
public class Class
{
private int X { get; set; } = 0;
public int Y { get; set; }
}
}
解决方案构建没有错误,命名空间未在 VS 中突出显示。 我已经在 VS 2022 和 2019 中检查了 .net 6 中的新控制台项目以及最新更新
VS 2022 社区版本 17.1.1
VS 2019 专业版 16.11
文档说它应该在两个 IDE 中都可用,但我无法让它工作。 有任何想法吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.