Skip to content

Commit 30e6add

Browse files
committed
Fix tests.
1 parent b81aade commit 30e6add

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

AspNetCoreAnalyzers.Tests/ValidWithAllAnalyzers.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace AspNetCoreAnalyzers.Tests
1+
namespace AspNetCoreAnalyzers.Tests
22
{
33
using System;
44
using System.Collections.Generic;
@@ -10,11 +10,13 @@ namespace AspNetCoreAnalyzers.Tests
1010

1111
public static class ValidWithAllAnalyzers
1212
{
13-
private static readonly IReadOnlyList<DiagnosticAnalyzer> AllAnalyzers = typeof(Descriptors)
14-
.Assembly.GetTypes()
15-
.Where(typeof(DiagnosticAnalyzer).IsAssignableFrom)
16-
.Select(t => (DiagnosticAnalyzer)Activator.CreateInstance(t))
17-
.ToArray();
13+
private static readonly IReadOnlyList<DiagnosticAnalyzer> AllAnalyzers =
14+
typeof(Descriptors)
15+
.Assembly
16+
.GetTypes()
17+
.Where(t => typeof(DiagnosticAnalyzer).IsAssignableFrom(t) && !t.IsAbstract)
18+
.Select(t => (DiagnosticAnalyzer)Activator.CreateInstance(t))
19+
.ToArray();
1820

1921
private static readonly Solution AnalyzersProjectSolution = CodeFactory.CreateSolution(
2022
ProjectFile.Find("AspNetCoreAnalyzers.csproj"),

0 commit comments

Comments
 (0)