Closed
Description
From @cryptonym64 on June 15, 2017 19:15
- VSCode Version: Code 1.13.1 (379d2efb5539b09112c793d3d9a413017d736f89, 2017-06-14T18:21:47.485Z)
- OS Version: Windows_NT ia32 10.0.14393
- Extensions:
Extension | Author | Version |
---|---|---|
csharp | ms-vscode | 1.10.0 |
PowerShell | ms-vscode | 1.3.2 |
theme-stayfresh | piotrekfracek | 1.1.2 |
theme-cobalt0 | sharksym | 0.0.5 |
Steps to Reproduce:
-
code this:
$a = 0
$b = @(1,2)
$b | ForEach-Object {
$a += 1
}
Write-Host $a -
Ctrl-Alt-F to format.
-
Notice that it warns:
file: 'untitled:Untitled-1' severity: 'Warning' message: 'The variable 'a' is assigned but never used. (PSUseDeclaredVarsMoreThanAssignments)' at: '4,5' source: 'PSScriptAnalyzer'
Copied from original issue: microsoft/vscode#28835