Skip to content

Duplicate PSSA-entries in Problem-tab after reopening file #3252

New issue

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

Closed
fflaten opened this issue Mar 21, 2021 · 1 comment · Fixed by PowerShell/PowerShellEditorServices#1869
Assignees
Labels
Area-Script Analysis Issue-Bug A bug to squash. Up for Grabs Will shepherd PRs.

Comments

@fflaten
Copy link
Contributor

fflaten commented Mar 21, 2021

Issue Description

Every time I open the same powershell-files, the same issues caught by the PSSA-integration are duplicated over and over in the Problems-tab in VSCode.

Steps to reproduce:

  1. Open VSCode with vscode-powershell enabled in a new folder with the following files:

demo.ps1

$myVar = "foo"

PSScriptAnalyzerSettings.psd1

@{
    Severity = @('Error','Warning')
    IncludeDefaultRules = $true
}
  1. Click on demo.ps1 and wait for the "variable never used"-problem
    image
  2. Close the file-tab (or click on PSScriptAnalyzerSettings.ps1 so it replaces the demo.ps1 file tab) and then open demo.ps1 again. The problem will now be shown twice or as many times as you reopen it
    image

Attached Logs

Follow the instructions in the README about
capturing and sending logs.

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.19042
VSCode 1.54.3
PowerShell Extension Version 2021.2.2

PowerShell Information

Name Value
PSVersion 7.1.3
PSEdition Core
GitCommitId 7.1.3
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.10032.0 6.0.0 6.1.0 6.2.0 7.0.0 7.1.3
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
powershell ms-vscode 2021.2.2
@ghost ghost added the Needs: Triage Maintainer attention needed! label Mar 21, 2021
@SydneyhSmith
Copy link
Collaborator

Thanks @fflaten I can reproduce this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Script Analysis Issue-Bug A bug to squash. Up for Grabs Will shepherd PRs.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants