private static void AnalyzeBlock(SyntaxNodeAnalysisContext context)
        {
            var block = (BlockSyntax)context.Node;

            if (block.Parent is AccessorDeclarationSyntax)
            {
                return;
            }

            if (block.Parent is AnonymousFunctionExpressionSyntax)
            {
                return;
            }

            SyntaxToken openBrace = block.OpenBraceToken;

            if (openBrace.IsMissing)
            {
                return;
            }

            if (DiagnosticRules.AddNewLineAfterOpeningBraceOfEmptyBlock.IsEffective(context) &&
                block.SyntaxTree.IsSingleLineSpan(block.Span))
            {
                DiagnosticHelpers.ReportDiagnostic(
                    context,
                    DiagnosticRules.AddNewLineAfterOpeningBraceOfEmptyBlock,
                    Location.Create(block.SyntaxTree, new TextSpan(openBrace.Span.End, 0)));
            }

            BlockBracesStyle style = context.GetBlockBracesStyle();

            if (style == BlockBracesStyle.None)
            {
                return;
            }

            if (block.SyntaxTree.IsSingleLineSpan(block.Span))
            {
                if (style == BlockBracesStyle.MultiLine ||
                    !IsEmptyBlock(block))
                {
                    DiagnosticHelpers.ReportDiagnostic(
                        context,
                        DiagnosticRules.FormatBlockBraces,
                        block.OpenBraceToken,
                        "multiple lines");
                }
            }
            else if (style == BlockBracesStyle.SingleLineWhenEmpty &&
                     IsEmptyBlock(block))
            {
                DiagnosticHelpers.ReportDiagnostic(
                    context,
                    DiagnosticRules.FormatBlockBraces,
                    block.OpenBraceToken,
                    "a single line");
            }
        }