public static void Analyze(SyntaxNodeAnalysisContext context, ElseClauseSyntax elseClause) { StatementSyntax statement = elseClause.Statement; SyntaxToken elseKeyword = elseClause.ElseKeyword; if (statement?.IsKind(SyntaxKind.Block, SyntaxKind.IfStatement) == false && context.SyntaxTree().IsMultiLineSpan(TextSpan.FromBounds(elseKeyword.SpanStart, statement.SpanStart))) { IfStatementSyntax topmostIf = elseClause.GetTopmostIf(); if (topmostIf != null) { Analyze(context, topmostIf, elseKeyword, statement); } } }