File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -64,19 +64,13 @@ public override void Initialize(AnalysisContext context)
64
64
// NOTE: even if we don't report the diagnostic, we still set the status so other analyzers can use it.
65
65
ctx . RegisterCompilationEndAction ( ctx =>
66
66
{
67
+ // NOTE: for multiple projects with the same product name, we only report one diagnostic,
68
+ // so it's expected to NOT get a diagnostic back. Also, we don't want to report
69
+ // multiple diagnostics for each project in a solution that uses the same product.
67
70
if ( Diagnostics . Pop ( Funding . Product ) is Diagnostic diagnostic )
68
71
{
69
72
ctx . ReportDiagnostic ( diagnostic ) ;
70
73
}
71
- else
72
- {
73
- // This should never happen and would be a bug.
74
- Debug . Assert ( true , "We should have provided a diagnostic of some kind for " + Funding . Product ) ;
75
- // We'll report it as unknown as a fallback for now.
76
- ctx . ReportDiagnostic ( Diagnostic . Create ( descriptors [ SponsorStatus . Unknown ] , null ,
77
- properties : ImmutableDictionary . Create < string , string ? > ( ) . Add ( nameof ( SponsorStatus ) , nameof ( SponsorStatus . Unknown ) ) ,
78
- Funding . Product , Sponsorables . Keys . Humanize ( Resources . Or ) ) ) ;
79
- }
80
74
} ) ;
81
75
}
82
76
} ) ;
You can’t perform that action at this time.
0 commit comments