@@ -131,7 +131,7 @@ private static void AnalyzeSummaryElement(SyntaxNodeAnalysisContext context, Xml
131131 var text = textElement == null ? string . Empty : XmlCommentHelper . GetText ( textElement , true ) . TrimStart ( ) ;
132132
133133 bool prefixIsGetsOrSets = text . StartsWith ( startingTextGetsOrSets , StringComparison . OrdinalIgnoreCase ) ;
134- bool prefixIsGets = text . StartsWith ( startingTextGets , StringComparison . OrdinalIgnoreCase ) && ! prefixIsGetsOrSets ;
134+ bool prefixIsGets = ! prefixIsGetsOrSets && text . StartsWith ( startingTextGets , StringComparison . OrdinalIgnoreCase ) ;
135135 bool prefixIsSets = text . StartsWith ( startingTextSets , StringComparison . OrdinalIgnoreCase ) ;
136136
137137 bool getterVisible , setterVisible ;
@@ -231,7 +231,7 @@ private static void AnalyzeSummaryElement(SyntaxNodeAnalysisContext context, Xml
231231 // Both getter and setter are visible.
232232 if ( ! prefixIsGetsOrSets )
233233 {
234- ReportSa1623 ( context , diagnosticLocation , diagnosticProperties , text , expectedStartingText : startingTextGetsOrSets , unexpectedStartingText1 : startingTextGets , unexpectedStartingText2 : startingTextSets ) ;
234+ ReportSA1623 ( context , diagnosticLocation , diagnosticProperties , text , expectedStartingText : startingTextGetsOrSets , unexpectedStartingText1 : startingTextGets , unexpectedStartingText2 : startingTextSets ) ;
235235 }
236236 }
237237 else if ( setter != null )
@@ -241,11 +241,11 @@ private static void AnalyzeSummaryElement(SyntaxNodeAnalysisContext context, Xml
241241 {
242242 if ( prefixIsGetsOrSets )
243243 {
244- ReportSa1624 ( context , diagnosticLocation , diagnosticProperties , accessor : "get" , expectedStartingText : startingTextGets , startingTextToRemove : startingTextGetsOrSets ) ;
244+ ReportSA1624 ( context , diagnosticLocation , diagnosticProperties , accessor : "get" , expectedStartingText : startingTextGets , startingTextToRemove : startingTextGetsOrSets ) ;
245245 }
246246 else
247247 {
248- ReportSa1623 ( context , diagnosticLocation , diagnosticProperties , text , expectedStartingText : startingTextGets , unexpectedStartingText1 : startingTextSets ) ;
248+ ReportSA1623 ( context , diagnosticLocation , diagnosticProperties , text , expectedStartingText : startingTextGets , unexpectedStartingText1 : startingTextSets ) ;
249249 }
250250 }
251251 }
@@ -254,7 +254,7 @@ private static void AnalyzeSummaryElement(SyntaxNodeAnalysisContext context, Xml
254254 // Getter exists and is visible. Setter does not exist.
255255 if ( ! prefixIsGets )
256256 {
257- ReportSa1623 ( context , diagnosticLocation , diagnosticProperties , text , expectedStartingText : startingTextGets , unexpectedStartingText1 : startingTextSets , unexpectedStartingText2 : startingTextGetsOrSets ) ;
257+ ReportSA1623 ( context , diagnosticLocation , diagnosticProperties , text , expectedStartingText : startingTextGets , unexpectedStartingText1 : startingTextSets , unexpectedStartingText2 : startingTextGetsOrSets ) ;
258258 }
259259 }
260260 }
@@ -267,11 +267,11 @@ private static void AnalyzeSummaryElement(SyntaxNodeAnalysisContext context, Xml
267267 {
268268 if ( prefixIsGetsOrSets )
269269 {
270- ReportSa1624 ( context , diagnosticLocation , diagnosticProperties , accessor : "set" , expectedStartingText : startingTextSets , startingTextToRemove : startingTextGetsOrSets ) ;
270+ ReportSA1624 ( context , diagnosticLocation , diagnosticProperties , accessor : "set" , expectedStartingText : startingTextSets , startingTextToRemove : startingTextGetsOrSets ) ;
271271 }
272272 else
273273 {
274- ReportSa1623 ( context , diagnosticLocation , diagnosticProperties , text , expectedStartingText : startingTextSets , unexpectedStartingText1 : startingTextGets ) ;
274+ ReportSA1623 ( context , diagnosticLocation , diagnosticProperties , text , expectedStartingText : startingTextSets , unexpectedStartingText1 : startingTextGets ) ;
275275 }
276276 }
277277 }
@@ -280,13 +280,13 @@ private static void AnalyzeSummaryElement(SyntaxNodeAnalysisContext context, Xml
280280 // Setter exists and is visible. Getter does not exist.
281281 if ( ! prefixIsSets )
282282 {
283- ReportSa1623 ( context , diagnosticLocation , diagnosticProperties , text , expectedStartingText : startingTextSets , unexpectedStartingText1 : startingTextGetsOrSets , unexpectedStartingText2 : startingTextGets ) ;
283+ ReportSA1623 ( context , diagnosticLocation , diagnosticProperties , text , expectedStartingText : startingTextSets , unexpectedStartingText1 : startingTextGetsOrSets , unexpectedStartingText2 : startingTextGets ) ;
284284 }
285285 }
286286 }
287287 }
288288
289- private static void ReportSa1623 ( SyntaxNodeAnalysisContext context , Location diagnosticLocation , ImmutableDictionary < string , string > . Builder diagnosticProperties , string text , string expectedStartingText , string unexpectedStartingText1 , string unexpectedStartingText2 = null )
289+ private static void ReportSA1623 ( SyntaxNodeAnalysisContext context , Location diagnosticLocation , ImmutableDictionary < string , string > . Builder diagnosticProperties , string text , string expectedStartingText , string unexpectedStartingText1 , string unexpectedStartingText2 = null )
290290 {
291291 diagnosticProperties . Add ( ExpectedTextKey , expectedStartingText ) ;
292292
@@ -302,7 +302,7 @@ private static void ReportSa1623(SyntaxNodeAnalysisContext context, Location dia
302302 context . ReportDiagnostic ( Diagnostic . Create ( SA1623Descriptor , diagnosticLocation , diagnosticProperties . ToImmutable ( ) , expectedStartingText ) ) ;
303303 }
304304
305- private static void ReportSa1624 ( SyntaxNodeAnalysisContext context , Location diagnosticLocation , ImmutableDictionary < string , string > . Builder diagnosticProperties , string accessor , string expectedStartingText , string startingTextToRemove )
305+ private static void ReportSA1624 ( SyntaxNodeAnalysisContext context , Location diagnosticLocation , ImmutableDictionary < string , string > . Builder diagnosticProperties , string accessor , string expectedStartingText , string startingTextToRemove )
306306 {
307307 diagnosticProperties . Add ( ExpectedTextKey , expectedStartingText ) ;
308308 diagnosticProperties . Add ( TextToRemoveKey , startingTextToRemove ) ;
0 commit comments