[英]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.