Skip to content

Commit ffa9006

Browse files
author
Kapil Borle
committed
Insert tabs if InsertSpaces is false
1 parent a4292c1 commit ffa9006

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Rules/UseConsistentIndentation.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,14 @@ private int GetIndentationColumnNumber(int indentationLevel)
265265

266266
private int GetIndentation(int indentationLevel)
267267
{
268-
return indentationLevel * this.IndentationSize;
268+
// todo if condition can be evaluated during rule configuration
269+
return indentationLevel * (InsertSpaces ? this.IndentationSize : 1);
269270
}
270271

271272
private char GetIndentationChar()
272273
{
273-
return indentationKind == IndentationKind.Space ? ' ' : '\t';
274+
// todo can be evaluated during rule configuration
275+
return InsertSpaces ? ' ' : '\t';
274276
}
275277

276278
private string GetIndentationString(int indentationLevel)

0 commit comments

Comments
 (0)