Skip to content

Commit cde7090

Browse files
committed
Remove else by using break as suggested in PR review
1 parent 85a0171 commit cde7090

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Rules/UseConsistentIndentation.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@ public override IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string file
160160
if (pipelineIndentationStyle == PipelineIndentationStyle.IncreaseIndentationAfterEveryPipeline)
161161
{
162162
AddViolation(token, indentationLevel++, diagnosticRecords, ref onNewLine);
163+
break;
163164
}
164-
else if (pipelineIndentationStyle == PipelineIndentationStyle.IncreaseIndentationForFirstPipeline)
165+
if (pipelineIndentationStyle == PipelineIndentationStyle.IncreaseIndentationForFirstPipeline)
165166
{
166167
bool isFirstPipeInPipeline = pipelineAsts.Any(pipelineAst => PositionIsEqual(((PipelineAst)pipelineAst).PipelineElements[0].Extent.EndScriptPosition, tokens[k - 1].Extent.EndScriptPosition));
167168
if (isFirstPipeInPipeline)

0 commit comments

Comments
 (0)