File tree Expand file tree Collapse file tree
PropertyChangedAnalyzers.Test Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ public static class LibrarySettings
2525 . WithCompilationOptions ( x => x . WithSuppressedDiagnostics ( "CS1701" ) )
2626 . WithMetadataReferences ( MetadataReferences . Transitive ( typeof ( Gu . Wpf . Reactive . AsyncCommand ) ) ) ;
2727
28+ internal static Settings Roslyn { get ; } = Settings . Default
29+ . WithMetadataReferences ( MetadataReferences . Transitive ( typeof ( Microsoft . CodeAnalysis . CodeFixes . CodeFixProvider ) ) ) ;
30+
2831 // Use this if the dll is not signed
2932 private static Assembly LoadUnsigned ( string dllName )
3033 {
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ public static class ValidWithAllAnalyzers
2424 . ToArray ( ) ;
2525
2626 private static readonly Solution AnalyzersProjectSolution = CodeFactory . CreateSolution (
27- ProjectFile . Find ( "PropertyChangedAnalyzers.csproj" ) ) ;
27+ ProjectFile . Find ( "PropertyChangedAnalyzers.csproj" ) ,
28+ LibrarySettings . Roslyn ) ;
2829
2930 private static readonly Solution ValidCodeProjectSln = CodeFactory . CreateSolution (
3031 ProjectFile . Find ( "ValidCode.csproj" ) ) ;
@@ -36,10 +37,10 @@ public static void NotEmpty()
3637 Assert . Pass ( $ "Count: { AllAnalyzers . Count } ") ;
3738 }
3839
39- [ Ignore ( "Does not pick up nullable attributes." ) ]
40- [ TestCaseSource ( nameof ( AllAnalyzers ) ) ]
40+ // [TestCaseSource(nameof(AllAnalyzers))]
4141 public static void AnalyzersProject ( DiagnosticAnalyzer analyzer )
4242 {
43+ // Does not figure out source package
4344 RoslynAssert . Valid ( analyzer , AnalyzersProjectSolution ) ;
4445 }
4546
Original file line number Diff line number Diff line change 7171 </ItemGroup >
7272
7373 <ItemGroup >
74- <PackageDownload Include =" Microsoft.NETCore.App.Ref" Version =" [5 .0.0]" />
74+ <PackageDownload Include =" Microsoft.NETCore.App.Ref" Version =" [6 .0.0]" />
7575 <PackageReference Include =" TunnelVisionLabs.ReferenceAssemblyAnnotator" Version =" 1.0.0-alpha.160" PrivateAssets =" all" />
7676 </ItemGroup >
7777
You can’t perform that action at this time.
0 commit comments