I wanted to stop Stylecop from flagging errors in the migrations folder for Entity Framework, in the end, I managed to do this by including a .editorconfig file inside the Migrations folder with contents as below. In theory, the generated_code = true, but in my case, I found that I had to specify the rule explicitly.
Should work for all analyzers BTW
[*.cs]
generated_code = true
dotnet_diagnostic.SA1413.severity = none
No comments:
Post a Comment