gpt4 book ai didi

visual-studio - 我们如何在 editorconfig Visual Studio 中抑制特定文件的诊断规则

转载 作者:行者123 更新时间:2023-12-04 10:46:24 26 4
gpt4 key购买 nike

我试图在诊断扫描时抑制编辑器配置中的文件。

下面是我的代码,谁能帮忙。

[*.文件.cs]generated_code = true

最佳答案

此功能是在问题发布后于 2020 年 3 月 16 日在 VS 16.5 版中添加的。

我在重新启动 VS 后得到了以下工作,因为 UI 有时会保留检测到的错误,即使 .editorconfig 说要忽略它。在我的/migrations/.editorconfig 文件中:

[*.cs]
generated_code = true

You now have the option to exclude generated files or folders when running analyzers. Create an EditorConfig file and mark the required files or folders as generated with the following syntax:

EditorConfig option to exclude generated files or foldersenter image description here

https://learn.microsoft.com/da-dk/visualstudio/releases/2019/release-notes#exclude-generated-files-folders

关于visual-studio - 我们如何在 editorconfig Visual Studio 中抑制特定文件的诊断规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59684874/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com