I've got an project with code from an custom code generator that i wrote.
The generated code is named something_gen.cs
Although in the editorconfig i specified that all *_gen.cs files should be ignored, SonarLint still analyses the gen files.
According to the SonarLint Documentation the Files shouldn't be analysed.
The .editorconfig looks like this
root = true
[*_gen.cs]
exclude = true
generated_code = true
[*.cs]
#Spaces and indents
indent_style=space
indent_size=4
and so on...
The Project Layout Looks like this
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