Closed gaufung closed 1 day ago
一致性的 C#
代码有两个作用
那个统一代码规范的最佳实践是步骤包含哪些?
.editorconfig
文件C#
工程中,可以让这些违反格式的代码作为编译的 warning
. 在 .editorconfig
文件的中配置如下 dotnet_style_qualification_for_event = true:warning
, 同时在 csproj
文件中配置 <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
C#
社区中,有很多开源工作可以帮助我们让代码规范更上一层楼。
https://blog.jetbrains.com/dotnet/2024/06/18/code-style-for-better-productivity-tips-and-tools-from-the-metalama-team/