Skip to content

Commit 4bfa302

Browse files
author
Kapil Borle
committed
Update close brace rule documentation
1 parent 95a3be4 commit 4bfa302

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

RuleDocumentation/PlaceCloseBrace.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Close brace placement should follow a consistent style. It should be on a new li
1313
Enable = $true
1414
NoEmptyLineBefore = $false
1515
IgnoreOneLineBlock = $true
16+
NewLineAfter = $true
1617
}
1718
}
1819
```
@@ -28,4 +29,7 @@ Create violation if there is an empty line before a close brace.
2829
#### IgnoreOneLineBlock: bool (Default value is `$true`)
2930
Indicates if close braces in a one line block should be ignored or not.
3031
E.g. $x = if ($true) { "blah" } else { "blah blah" }
31-
In the above example, if the property is set to true then the rule will not fire a violation.
32+
In the above example, if the property is set to true then the rule will not fire a violation.
33+
34+
#### NewLineAfter: bool (Default value is `$true`)
35+
Indicates if a new line should follow a close brace. If set to true a close brace should be followed by a new line.

Rules/PlaceCloseBrace.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class PlaceCloseBrace : ConfigurableRule
3131
/// <summary>
3232
/// Indicates if there should or should not be an empty line before a close brace.
3333
///
34-
/// Default value if false.
34+
/// Default value is false.
3535
/// </summary>
3636
[ConfigurableRuleProperty(defaultValue:false)]
3737
public bool NoEmptyLineBefore { get; protected set; }
@@ -42,17 +42,17 @@ public class PlaceCloseBrace : ConfigurableRule
4242
/// In the above example, if the property is set to true then the rule will
4343
/// not fire a violation.
4444
///
45-
/// Default value if true.
45+
/// Default value is true.
4646
/// </summary>
4747
[ConfigurableRuleProperty(defaultValue: true)]
4848
public bool IgnoreOneLineBlock { get; protected set; }
4949

5050
/// <summary>
5151
/// Indicates if a new line should follow a close brace.
5252
///
53-
/// If set to true a close brace should not be followed by any keyword.
53+
/// If set to true a close brace should be followed by a new line.
5454
///
55-
/// Default value if true.
55+
/// Default value is true.
5656
/// </summary>
5757
[ConfigurableRuleProperty(defaultValue: true)]
5858
public bool NewLineAfter { get; protected set; }

0 commit comments

Comments
 (0)