Open JohnYoungers opened 7 months ago
@cincuranet / @roji - does adding that declaration seem feasible?
Without including generated_code = true
, we end up triggering several other analytic issues (Collection initialization can be simplified, etc)
In EFCore5, using the
.editorconfig
I would mark the scaffolded files asgenerated_code = true
: this ensured the classes wouldn't trigger any analytic or styling issues with the build.In the past few versions, now that code is scaffolded with
<Nullable>enable</Nullable>
in mind, mygenerated_code
setting ends up overriding the behavior partially due to this (see theImportant
section): https://learn.microsoft.com/en-us/dotnet/csharp/nullable-migration-strategies#plan-your-migrationI'm not sure if it can be detected automatically, or if we could add a flag to do so, but it would be beneficial if we could include
#nullable enable
in the generated files for this scenario