Skip to content

Commit 972e5c4

Browse files
committed
Check a line starting with LParen for correct indentation, even if that LParen doesn't impact the indentation level
1 parent a754b95 commit 972e5c4

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
@@ -163,6 +163,7 @@ caused by tokens that require a closing RParen (which are LParen, AtParen and Do
163163
break;
164164

165165
case TokenKind.LParen:
166+
AddViolation(token, indentationLevel, diagnosticRecords, ref onNewLine);
166167
// When a line starts with a parenthesis and it is not the last non-comment token of that line,
167168
// then indentation does not need to be increased.
168169
if ((tokenIndex == 0 || tokens[tokenIndex - 1].Kind == TokenKind.NewLine) &&
@@ -173,7 +174,7 @@ caused by tokens that require a closing RParen (which are LParen, AtParen and Do
173174
break;
174175
}
175176
lParenSkippedIndentation.Push(false);
176-
AddViolation(token, indentationLevel++, diagnosticRecords, ref onNewLine);
177+
indentationLevel++;
177178
break;
178179

179180
case TokenKind.Pipe:

0 commit comments

Comments
 (0)