description | ms.custom | ms.date | ms.topic | title |
---|---|---|---|---|
Avoid semicolons as line terminators |
PSSA v1.21.0 |
06/28/2023 |
reference |
AvoidSemicolonsAsLineTerminators |
Severity Level: Warning
Lines should not end with a semicolon.
Note
This rule is not enabled by default. The user needs to enable it through settings.
Install-Module -Name PSScriptAnalyzer; $a = 1 + $b;
Install-Module -Name PSScriptAnalyzer;
$a = 1 + $b
Install-Module -Name PSScriptAnalyzer; $a = 1 + $b
Install-Module -Name PSScriptAnalyzer
$a = 1 + $b
Rules = @{
PSAvoidSemicolonsAsLineTerminators = @{
Enable = $true
}
}
Enable or disable the rule during ScriptAnalyzer invocation.