dotnet/roslyn

Remove or document "CompilerDiagnostic" type

Open

#63,938 建立於 2022年9月12日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)C# (4,257 fork)batch import
Area-AnalyzersConcept-Continuous Improvementhelp wanted

倉庫指標

Star
 (20,414 star)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 256 個 PR)

描述

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.

貢獻者指南