Severity Level: Warning
Note: This rule is not enabled by default. The user needs to enable it through settings.
Rules = @{
PSUseConsistentWhitespace = @{
Enable = $true
CheckOpenBrace = $true
CheckOpenParen = $true
CheckOperator = $true
CheckSeparator = $true
}
}
Enable or disable the rule during ScriptAnalyzer invocation.
Checks if there is a space between a keyword and its corresponding open brace. E.g. foo { }
.
Checks if there is space between a keyword and its corresponding open parenthesis. E.g. if (true)
.
Checks if a binary operator is surrounded on both sides by a space. E.g. $x = 1
.
Checks if a comma or a semicolon is followed by a space. E.g. @(1, 2, 3)
or @{a = 1; b = 2}
.