Skip to content

Commit 1f78dfc

Browse files
committed
Missing type name in xUnit3003 analyzer message
1 parent 4fb7d75 commit 1f78dfc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/xunit.analyzers/X3000/FactAttributeDerivedClassesShouldProvideSourceInformationConstructor.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Linq;
33
using Microsoft.CodeAnalysis;
4+
using Microsoft.CodeAnalysis.CSharp;
45
using Microsoft.CodeAnalysis.Diagnostics;
56

67
namespace Xunit.Analyzers;
@@ -54,7 +55,8 @@ public override void AnalyzeCompilation(
5455
context.ReportDiagnostic(
5556
Diagnostic.Create(
5657
Descriptors.X3003_ProvideConstructorForFactAttributeOverride,
57-
type.Locations.First()
58+
type.Locations.First(),
59+
SymbolDisplay.ToDisplayString(type)
5860
)
5961
);
6062
}, SymbolKind.NamedType);

0 commit comments

Comments
 (0)