DevTeam / Pure.DI

Pure DI for .NET
MIT License
410 stars 21 forks source link

Generated Code emits Warnings from StyleCop rules #18

Closed FreeApophis closed 1 year ago

FreeApophis commented 1 year ago

Sadly the generated code hits quite a few warnings in our codebase

Currently you deactivate the warnings from analyzers and JetBrains one by one by hand:

Instead you should make it clear to the Analyzers that the code is auto-generated and therefore the style is not checked:

https://shishkin.wordpress.com/2008/07/08/stylecop-how-to-ignore-generated-code/

You can add the comment on the start of the file:

// <auto-generated/>

I am not sure how necessary the file type is, but generated code usually has one of the following file endings, this could also help top avoid warnings from automatic tooling:

.generated.cs .g.cs *.Designer.cs

NikolayPianikov commented 1 year ago

Thx for bug reporting, the fixed version is 1.1.61