@@ -656,28 +656,21 @@ await TestNuGetAndVsixAnalyzerCoreAsync(
656656 // 1) No duplicate diagnostics
657657 // 2) Both NuGet and Vsix analyzers execute
658658 // 3) Appropriate diagnostic filtering is done - Nuget suppressor suppresses VSIX analyzer.
659- //
660- // 🐛 After splitting fallback options into separate CompilationWithAnalyzers for project and host analyzers,
661- // NuGet-installed suppressors no longer act on VSIX-installed analyzer diagnostics. Fixing this requires us to
662- // add NuGet-installed analyzer references to the host CompilationWithAnalyzers, with an additional flag
663- // indicating that only suppressors should run for these references.
664- // https://github.com/dotnet/roslyn/issues/75399
665- const bool FalseButShouldBeTrue = false ;
666659 await TestNuGetAndVsixAnalyzerCoreAsync (
667660 nugetAnalyzers : ImmutableArray . Create ( firstNugetAnalyzer ) ,
668661 expectedNugetAnalyzersExecuted : true ,
669662 vsixAnalyzers : ImmutableArray . Create ( vsixAnalyzer ) ,
670663 expectedVsixAnalyzersExecuted : true ,
671664 nugetSuppressors : ImmutableArray . Create ( nugetSuppressor ) ,
672- expectedNugetSuppressorsExecuted : FalseButShouldBeTrue ,
665+ expectedNugetSuppressorsExecuted : true ,
673666 vsixSuppressors : ImmutableArray < VsixSuppressor > . Empty ,
674667 expectedVsixSuppressorsExecuted : false ,
675668 new [ ]
676669 {
677670 ( Diagnostic ( "A" , "Class" ) . WithLocation ( 1 , 7 ) , nameof ( NuGetAnalyzer ) ) ,
678- ( Diagnostic ( "X" , "Class" , isSuppressed : FalseButShouldBeTrue ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) ) ,
679- ( Diagnostic ( "Y" , "Class" , isSuppressed : FalseButShouldBeTrue ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) ) ,
680- ( Diagnostic ( "Z" , "Class" , isSuppressed : FalseButShouldBeTrue ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) )
671+ ( Diagnostic ( "X" , "Class" , isSuppressed : true ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) ) ,
672+ ( Diagnostic ( "Y" , "Class" , isSuppressed : true ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) ) ,
673+ ( Diagnostic ( "Z" , "Class" , isSuppressed : true ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) )
681674 } ) ;
682675
683676 // Suppressors with duplicate support for VsixAnalyzer, but not 100% overlap. Verify the following:
@@ -691,15 +684,15 @@ await TestNuGetAndVsixAnalyzerCoreAsync(
691684 vsixAnalyzers : ImmutableArray . Create ( vsixAnalyzer ) ,
692685 expectedVsixAnalyzersExecuted : true ,
693686 nugetSuppressors : ImmutableArray . Create ( partialNugetSuppressor ) ,
694- expectedNugetSuppressorsExecuted : FalseButShouldBeTrue ,
687+ expectedNugetSuppressorsExecuted : true ,
695688 vsixSuppressors : ImmutableArray . Create ( vsixSuppressor ) ,
696689 expectedVsixSuppressorsExecuted : false ,
697690 new [ ]
698691 {
699692 ( Diagnostic ( "A" , "Class" ) . WithLocation ( 1 , 7 ) , nameof ( NuGetAnalyzer ) ) ,
700693 ( Diagnostic ( "X" , "Class" , isSuppressed : false ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) ) ,
701- ( Diagnostic ( "Y" , "Class" , isSuppressed : FalseButShouldBeTrue ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) ) ,
702- ( Diagnostic ( "Z" , "Class" , isSuppressed : FalseButShouldBeTrue ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) )
694+ ( Diagnostic ( "Y" , "Class" , isSuppressed : true ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) ) ,
695+ ( Diagnostic ( "Z" , "Class" , isSuppressed : true ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) )
703696 } ) ;
704697
705698 // Suppressors with duplicate support for VsixAnalyzer, with 100% overlap. Verify the following:
@@ -713,15 +706,15 @@ await TestNuGetAndVsixAnalyzerCoreAsync(
713706 vsixAnalyzers : ImmutableArray . Create ( vsixAnalyzer ) ,
714707 expectedVsixAnalyzersExecuted : true ,
715708 nugetSuppressors : ImmutableArray . Create ( nugetSuppressor ) ,
716- expectedNugetSuppressorsExecuted : FalseButShouldBeTrue ,
709+ expectedNugetSuppressorsExecuted : true ,
717710 vsixSuppressors : ImmutableArray . Create ( vsixSuppressor ) ,
718711 expectedVsixSuppressorsExecuted : false ,
719712 new [ ]
720713 {
721714 ( Diagnostic ( "A" , "Class" ) . WithLocation ( 1 , 7 ) , nameof ( NuGetAnalyzer ) ) ,
722- ( Diagnostic ( "X" , "Class" , isSuppressed : FalseButShouldBeTrue ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) ) ,
723- ( Diagnostic ( "Y" , "Class" , isSuppressed : FalseButShouldBeTrue ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) ) ,
724- ( Diagnostic ( "Z" , "Class" , isSuppressed : FalseButShouldBeTrue ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) )
715+ ( Diagnostic ( "X" , "Class" , isSuppressed : true ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) ) ,
716+ ( Diagnostic ( "Y" , "Class" , isSuppressed : true ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) ) ,
717+ ( Diagnostic ( "Z" , "Class" , isSuppressed : true ) . WithLocation ( 1 , 7 ) , nameof ( VsixAnalyzer ) )
725718 } ) ;
726719 }
727720
0 commit comments