We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue Type: Bug
Create a PowerShell file in VSCode with the following content:
5..10 | ForEach-Object {$id=1} { Write-Output $id $id++ }
Expected result: Code has 0 problems Actual result: Code has 1 problem: { "resource": "Untitled-1.ps1", "owner": "generated_diagnostic_collection_name#2", "code": "PSUseDeclaredVarsMoreThanAssignments", "severity": 4, "message": "The variable 'id' is assigned but never used.", "source": "PSScriptAnalyzer", "startLineNumber": 1, "startColumn": 25, "endLineNumber": 1, "endColumn": 28 }
Extension version: 2020.3.0 VS Code version: Code 1.44.0 (2aae1f26c72891c399f860409176fe435a154b13, 2020-04-07T23:31:18.860Z) OS version: Windows_NT x64 10.0.18363
The text was updated successfully, but these errors were encountered:
This is a known issue due to the analysis of this role being limited to the scope of one scriptblock. Therefore closing as a duplicate of #1163
Sorry, something went wrong.
No branches or pull requests
Issue Type: Bug
Create a PowerShell file in VSCode with the following content:
5..10 | ForEach-Object {$id=1} {
Write-Output $id
$id++
}
Expected result: Code has 0 problems
Actual result: Code has 1 problem:
{
"resource": "Untitled-1.ps1",
"owner": "generated_diagnostic_collection_name#2",
"code": "PSUseDeclaredVarsMoreThanAssignments",
"severity": 4,
"message": "The variable 'id' is assigned but never used.",
"source": "PSScriptAnalyzer",
"startLineNumber": 1,
"startColumn": 25,
"endLineNumber": 1,
"endColumn": 28
}
Extension version: 2020.3.0
VS Code version: Code 1.44.0 (2aae1f26c72891c399f860409176fe435a154b13, 2020-04-07T23:31:18.860Z)
OS version: Windows_NT x64 10.0.18363
The text was updated successfully, but these errors were encountered: