Skip to content

PSScriptAnalyzer rule changes not sticky using PowerShell/vscode-powershell #975

Closed
@alx9r

Description

@alx9r

I understand that the fault may lie with PowerShell/vscode-powershell. I'm opening this bug here for the following reasons:

  1. It reflects badly on PSScriptAnalyzer regardless of the cause.
  2. PowerShell/vscode-powershell#899(comment) has already been asked and seems like should be straightforward for a developer familiar with the projects to answer. An answer to that question probably would have averted this issue. Despite this, that question on PowerShell/vscode-powershell has remained unanswered for more than 90 days.

Steps to reproduce

  1. Fresh install of Visual Studio Code 1.22.2.
  2. Install the PowerShell Extensions in Visual Studio Code.
  3. Select "PowerShell: Select ScriptAnalyzer Rules" from the command pallette.
  4. Note the state of the checkbox for the first item.
  5. Toggle the state of the checkbox for the first item.
  6. Click "Confirm".
  7. Restart Visual Studio Code.
  8. Select "PowerShell: Select ScriptAnalyzer Rules" from the command pallette, again.
  9. Note the state of the checkbox for the first item.

Expected behavior

The item's checkbox state would stick across sessions.

Actual behavior

The item's checkbox state reverts back to the state immediately after installation of VS Code and PowerShell/vscode-powershell.

Environment data

> $PSVersionTable

Name                           Value                                      
----                           -----                                      
PSVersion                      5.1.14409.1012                             
PSEdition                      Desktop                                    
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                    
BuildVersion                   10.0.14409.1012                            
CLRVersion                     4.0.30319.42000                            
WSManStackVersion              3.0                                        
PSRemotingProtocolVersion      2.3                                        
SerializationVersion           1.1.0.1                                    

> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }
1.16.1
ms-vscode.powershell
v1.6.0
VS Code
Version 1.22.2
Commit 3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9
Date 2018-04-12T17:28:16.777Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture ia32

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions