【发布时间】:2020-07-10 14:22:10
【问题描述】:
我有一个项目,其中包含我编写的自定义代码生成器中的代码。
生成的代码名为 something_gen.cs
尽管在 editorconfig 中我指定所有 *_gen.cs 文件都应该被忽略,SonarLint 仍然分析 gen 文件。
根据SonarLint Documentation,不应分析文件。
.editorconfig 看起来像这样
root = true
[*_gen.cs]
exclude = true
generated_code = true
[*.cs]
#Spaces and indents
indent_style=space
indent_size=4
and so on...
项目布局是这样的
Project Root
|-Project.sln
|-.editorconfig
|Module A
|-codeA.cs
|-codeB.cs
|-code_gen.cs
|-ModuleA.csproj
|Module B
|-codeA.cs
|-codeB.cs
|-code_gen.cs
|-ModuleB.csproj
【问题讨论】:
标签: c# visual-studio sonarlint editorconfig