@@ -121,7 +121,7 @@ private static void AnalyzeSummaryElement(SyntaxNodeAnalysisContext context, Xml
121121
122122 if ( getter != null || expressionBody != null )
123123 {
124- bool startsWithGetOrSet = text . StartsWith ( startingTextGetsOrSets , StringComparison . Ordinal ) ;
124+ bool startsWithGetOrSet = text . StartsWith ( startingTextGetsOrSets , StringComparison . OrdinalIgnoreCase ) ;
125125
126126 if ( setter != null )
127127 {
@@ -210,7 +210,7 @@ private static void AnalyzeSummaryElement(SyntaxNodeAnalysisContext context, Xml
210210 diagnosticProperties . Add ( TextToRemoveKey , startingTextGetsOrSets ) ;
211211 context . ReportDiagnostic ( Diagnostic . Create ( SA1624Descriptor , diagnosticLocation , diagnosticProperties . ToImmutable ( ) , "get" , startingTextGets ) ) ;
212212 }
213- else if ( ! text . StartsWith ( startingTextGets , StringComparison . Ordinal ) )
213+ else if ( ! text . StartsWith ( startingTextGets , StringComparison . OrdinalIgnoreCase ) )
214214 {
215215 diagnosticProperties . Add ( ExpectedTextKey , startingTextGets ) ;
216216 context . ReportDiagnostic ( Diagnostic . Create ( SA1623Descriptor , diagnosticLocation , diagnosticProperties . ToImmutable ( ) , startingTextGets ) ) ;
@@ -224,7 +224,7 @@ private static void AnalyzeSummaryElement(SyntaxNodeAnalysisContext context, Xml
224224 diagnosticProperties . Add ( TextToRemoveKey , startingTextGetsOrSets ) ;
225225 context . ReportDiagnostic ( Diagnostic . Create ( SA1624Descriptor , diagnosticLocation , diagnosticProperties . ToImmutable ( ) , "set" , startingTextSets ) ) ;
226226 }
227- else if ( ! text . StartsWith ( startingTextSets , StringComparison . Ordinal ) )
227+ else if ( ! text . StartsWith ( startingTextSets , StringComparison . OrdinalIgnoreCase ) )
228228 {
229229 diagnosticProperties . Add ( ExpectedTextKey , startingTextSets ) ;
230230 context . ReportDiagnostic ( Diagnostic . Create ( SA1623Descriptor , diagnosticLocation , diagnosticProperties . ToImmutable ( ) , startingTextSets ) ) ;
@@ -235,6 +235,16 @@ private static void AnalyzeSummaryElement(SyntaxNodeAnalysisContext context, Xml
235235 if ( ! startsWithGetOrSet )
236236 {
237237 diagnosticProperties . Add ( ExpectedTextKey , startingTextGetsOrSets ) ;
238+
239+ if ( text . StartsWith ( startingTextGets , StringComparison . OrdinalIgnoreCase ) )
240+ {
241+ diagnosticProperties . Add ( TextToRemoveKey , text . Substring ( 0 , startingTextGets . Length ) ) ;
242+ }
243+ else if ( text . StartsWith ( startingTextSets , StringComparison . OrdinalIgnoreCase ) )
244+ {
245+ diagnosticProperties . Add ( TextToRemoveKey , text . Substring ( 0 , startingTextSets . Length ) ) ;
246+ }
247+
238248 context . ReportDiagnostic ( Diagnostic . Create ( SA1623Descriptor , diagnosticLocation , diagnosticProperties . ToImmutable ( ) , startingTextGetsOrSets ) ) ;
239249 }
240250 }
0 commit comments