.editorconfig diagnostic suppressions don't apply to source-generated files
Author: jasonmalinowskiCreated Sep 2, 2020Updated Sep 17, 2026
LabelsBugArea-CompilersFeature - Source Generators
The failures in https://github.com/dotnet/roslyn/pull/47252 demonstrate this, I think. We have this set in our .editorconfig:
When we had the file checked in explicitly, then I'm guessing this took effect; when it's converted to source generator output, we're now getting warnings from the source-generated file.
It's not clear to me if the real fix here is we need to switch some of those settings to be global suppressions so they apply everywhere.
Source: dotnet/roslyn