private void AnalyzeDoStatement(SyntaxNodeAnalysisContext context)
        {
            var doStatement = (DoStatementSyntax)context.Node;

            if (ReplaceDoStatementWithWhileStatementRefactoring.CanRefactor(doStatement))
            {
                context.ReportDiagnostic(
                    DiagnosticDescriptors.AvoidUsageOfDoStatementToCreateInfiniteLoop,
                    doStatement.DoKeyword);
            }

            AddEmptyLineAfterLastStatementInDoStatementRefactoring.Analyze(context, doStatement);
        }
        private void AnalyzeDoStatement(SyntaxNodeAnalysisContext context)
        {
            if (GeneratedCodeAnalyzer?.IsGeneratedCode(context) == true)
            {
                return;
            }

            var doStatement = (DoStatementSyntax)context.Node;

            if (ReplaceDoStatementWithWhileStatementRefactoring.CanRefactor(doStatement))
            {
                context.ReportDiagnostic(
                    DiagnosticDescriptors.AvoidUsageOfDoStatementToCreateInfiniteLoop,
                    doStatement.DoKeyword.GetLocation());
            }

            AnalyzeAddEmptyLineAfterLastStatementInDoStatement(context, doStatement);
        }