You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This rule enforces consistent brace, parenthesis, binary operator, assignment operator and separator styles. For more information please see the [Parameters](#parameters) section.
6
+
7
+
**Note**: This rule is not enabled by default. The user needs to enable it through settings.
8
+
9
+
## Configuration
10
+
```powershell
11
+
Rules = @{
12
+
PSUseConsistentWhitespace = @{
13
+
Enable = $true
14
+
CheckOpenBrace = $true
15
+
CheckOpenParen = $true
16
+
CheckOperator = $true
17
+
CheckSeparator = $true
18
+
}
19
+
}
20
+
```
21
+
22
+
### Parameters
23
+
24
+
#### Enable: bool (Default value is `$false`)
25
+
Enable or disable the rule during ScriptAnalyzer invocation.
26
+
27
+
#### CheckOpenBrace: bool (Default value is `$true`)
28
+
Checks if there is a space between a keyword and its corresponding open brace. E.g. `foo { }`.
29
+
30
+
#### CheckOpenParen: bool (Default value is `$true`)
31
+
Checks if there is space between a keyword and its corresponding open parenthesis. E.g. `if (true)`.
32
+
33
+
#### CheckOperator: bool (Default value is `$true`)
34
+
Checks if a binary operator is surrounded on both sides by a space. E.g. `$x = 1`.
35
+
36
+
#### CheckSeparator: bool (Default value is `$true`)
37
+
Checks if a comma or a semicolon is followed by a space. E.g. `@(1, 2, 3)` or `@{a = 1; b = 2}`.
<value>Check for whitespace between keyword and open paren/curly, around assigment operator ('='), around arithmetic operators and after separators (',' and ';')</value>
0 commit comments