Skip to content

Commit 619a6d0

Browse files
author
Kapil Borle
committed
Add comments to brace rules
1 parent 94f298d commit 619a6d0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Rules/PlaceCloseBrace.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
4343

4444
// TODO Should have the following options
4545
// * no-empty-line-before
46-
// * on-new-line
47-
// * align
46+
// * align (if close brance and open brace on new lines align with open brace,
47+
// if close brace is on new line but open brace is not align with the first keyword on open brace line)
4848

4949
var tokens = Helper.Instance.Tokens;
5050
var diagnosticRecords = new List<DiagnosticRecord>();

Rules/PlaceOpenBrace.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
5050
// * on-same-line
5151
// * on-new-line
5252
// * no-empty-line-after
53+
// * stick-a-space-before
5354

5455
var lCurlyTokenPositions = new List<int>();
5556
var tokens = Helper.Instance.Tokens;
5657
for (int k = 2; k < tokens.Length; k++)
5758
{
58-
5959
if (tokens[k].Kind == TokenKind.LCurly
6060
&& tokens[k - 1].Kind == TokenKind.NewLine)
6161
{

0 commit comments

Comments
 (0)