@@ -166,6 +166,58 @@ private void Method3()
166166 await this . VerifyCSharpDiagnosticAsync ( testCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
167167 }
168168
169+ /// <summary>
170+ /// Verifies that a multi-line documentation comment without leading spaces is handled correctly.
171+ /// </summary>
172+ /// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
173+ [ Fact ]
174+ public async Task TestMultilineDocumentationCommentWithoutLeadingSpacesAsync ( )
175+ {
176+ string testCode = @"
177+ public class TypeName
178+ {
179+ /**
180+ *<summary>
181+ * The summary text.
182+ *</summary>
183+ * <param name=""x"">The document root.</param>
184+ * <param name=""y"">The XML header token.</param>
185+ */
186+ private void Method1(int x, int y)
187+ {
188+ }
189+ }
190+ " ;
191+
192+ string fixedCode = @"
193+ public class TypeName
194+ {
195+ /**
196+ * <summary>
197+ * The summary text.
198+ * </summary>
199+ * <param name=""x"">The document root.</param>
200+ * <param name=""y"">The XML header token.</param>
201+ */
202+ private void Method1(int x, int y)
203+ {
204+ }
205+ }
206+ " ;
207+
208+ DiagnosticResult [ ] expected =
209+ {
210+ this . CSharpDiagnostic ( ) . WithLocation ( 5 , 7 ) ,
211+ this . CSharpDiagnostic ( ) . WithLocation ( 7 , 7 ) ,
212+ this . CSharpDiagnostic ( ) . WithLocation ( 8 , 7 ) ,
213+ this . CSharpDiagnostic ( ) . WithLocation ( 9 , 7 )
214+ } ;
215+
216+ await this . VerifyCSharpDiagnosticAsync ( testCode , expected , CancellationToken . None ) . ConfigureAwait ( false ) ;
217+ await this . VerifyCSharpDiagnosticAsync ( fixedCode , EmptyDiagnosticResults , CancellationToken . None ) . ConfigureAwait ( false ) ;
218+ await this . VerifyCSharpFixAsync ( testCode , fixedCode ) . ConfigureAwait ( false ) ;
219+ }
220+
169221 /// <inheritdoc/>
170222 protected override IEnumerable < DiagnosticAnalyzer > GetCSharpDiagnosticAnalyzers ( )
171223 {
0 commit comments