Skip to content

Commit 5f7990e

Browse files
authored
refactor: include referenced assemblies when retrieving all named types in compilation (#3529)
1 parent 6657916 commit 5f7990e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

TUnit.Analyzers/AbstractTestClassWithDataSourcesAnalyzer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ private void AnalyzeSymbol(SymbolAnalysisContext context)
9999

100100
private static bool HasConcreteInheritingClassesWithInheritsTests(SymbolAnalysisContext context, INamedTypeSymbol abstractClass)
101101
{
102-
// Get all named types in the compilation
103-
var allTypes = GetAllNamedTypes(context.Compilation.Assembly.GlobalNamespace);
102+
// Get all named types in the compilation (including referenced assemblies)
103+
var allTypes = GetAllNamedTypes(context.Compilation.GlobalNamespace);
104104

105105
// Check if any concrete class inherits from the abstract class and has [InheritsTests]
106106
foreach (var type in allTypes)

0 commit comments

Comments
 (0)