dotnet/roslyn

Remove or document "CompilerDiagnostic" type

Open

#63.938 aperta il 12 set 2022

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)C# (4257 fork)batch import
Area-AnalyzersConcept-Continuous Improvementhelp wanted

Metriche repository

Star
 (20.414 star)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

See https://github.com/dotnet/roslyn/pull/63937 for details

For compiler diagnostics which have a non-null property bag attached to it, the CompilerDiagnosticAnalyzer reports a wrapping CompilerDiagnostic: https://github.com/dotnet/roslyn/blob/c71fa5419aa035a8d76c8a82387353e3892180a7/src/Compilers/Core/Portable/DiagnosticAnalyzer/CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs#L70-L71

I do not have historical context on why we report this wrapping CompilerDiagnostic in presence of a non-null property bag on the diagnostic. We may want to consider experimenting removing this type and verify what, if anything, breaks. At the minimum, we should document the reason behind this wrapping diagnostic. I'll file a tracking issue for this work.

Guida contributor