diff --git a/Design/Rule0026ToolTipPunctuation.cs b/Design/Rule0026ToolTipPunctuation.cs index 37f33867..e4db7124 100644 --- a/Design/Rule0026ToolTipPunctuation.cs +++ b/Design/Rule0026ToolTipPunctuation.cs @@ -31,8 +31,8 @@ private void AnalyzeToolTipPunctuation(SyntaxNodeAnalysisContext ctx) if (tooltipLabel.Value.ToString().Contains("\\")) ctx.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0026ToolTipDoNotUseLineBreaks, tooltipProperty.GetLocation())); - if (((IControlSymbol)ctx.ContainingSymbol).ControlKind == ControlKind.Field) - if (!tooltipLabel.Value.ToString().StartsWith("Specifies")) + if (ctx.ContainingSymbol.Kind == SymbolKind.Control && ((IControlSymbol)ctx.ContainingSymbol).ControlKind == ControlKind.Field) + if (!tooltipLabel.Value.ToString().StartsWith("'Specifies")) ctx.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0026ToolTipShouldStartWithSpecifies, tooltipProperty.GetLocation())); } }