question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Select PSScriptAnalyzer rules' command broke starting with preview extension 2019.11.0

See original GitHub issue

Using 2020.1.0 but I have seen it before the recent update. Going back to previous release, I found that 2019.9.0 was the last version where it still worked therefore it something in between 2019.9.0 and 2019.11.0 ,which is likely going to be the omnisharp refactoring @TylerLeonhardt

System Details Output

### VSCode version: 1.42.0-insider 33c79d5ad447956814a2a3658029dffb9e28bae6 x64

### VSCode extensions:
DavidAnson.vscode-markdownlint@0.33.0
eamodio.gitlens@10.2.0
mauve.terraform@1.4.0
ms-azure-devops.azure-pipelines@1.157.4
ms-azuretools.vscode-azureappservice@0.16.2
ms-azuretools.vscode-azurefunctions@0.20.1
ms-azuretools.vscode-azurestorage@0.7.2
ms-azuretools.vscode-azureterraform@0.3.0
ms-azuretools.vscode-docker@0.9.0
ms-python.python@2020.1.58038
ms-vscode-remote.remote-containers@0.97.0
ms-vscode-remote.remote-wsl@0.42.1
ms-vscode.azure-account@0.8.8
ms-vscode.csharp@1.21.9
ms-vscode.powershell@2020.1.0
ms-vscode.powershell-preview@2020.1.0
ms-vsonline.vsonline@1.0.1424
msazurermtools.azurerm-vscode-tools@0.8.3
samcogan.arm-snippets@1.4.19


### PSES version:

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      7.0.0-rc.1
PSEdition                      Core
GitCommitId                    7.0.0-rc.1
OS                             Microsoft Windows 10.0.18362
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Description

Open a PowerShell file to start the extension. When selecting the ‘Select PSScriptAnalyzer rules’ nothing happens

Expected Behaviour

A dropdown menu of PSSA rules should come up.

Actual Behaviour

Nothing happens

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
bergmeistercommented, Jan 17, 2020

Yes, the feature is very incomplete and it’s probably going to take a long time until it will be implemented. It also has confused user’s at time due to the setting not persisting after vs-code closes. I myself use it only to show the default set of PSSA rules at talks and how to enable all rules. In this case I’d rather remove the entry in package.json because having a command that does not do anything is even more confusing IMHO

2reactions
TylerLeonhardtcommented, Jan 16, 2020

I kinda removed it on purpose. Or rather, I didn’t add it back in when doing the Omnisharp work.

My reasoning was:

  • It felt like an incomplete feature - it’s only active during your current session which is a silly limitation and should be backed by a PSScriptAnalyzer settings file somewhere
  • I doubted it was being used…

I really want this kind of integration but I want to do it better. Also, since PSScriptAnalyzer’s 2.0 release is in planning and the settings structure could change as a result, I didn’t want to jump into this feature before that.

I’d be ok bringing back the experience we already had, but it’s not going to be a priority for us right at the moment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release of PowerShell Script Analyzer (PSScriptAnalyzer ...
Release of PowerShell Script Analyzer (PSScriptAnalyzer) 1.18.2 ... Visual Studio Code extension start by executing the following command:
Read more >
How to disable PSScriptAnalyzer's ...
Hit F1 in Visual Studio Code to make the search bar appear; Write >PowerShell: Select PS then choose PowerShell: Select PSScriptAnalyzer Rules ......
Read more >
https://gist.githubusercontent.com/roysubs/5c6a16e...
break } ; Get-Command -Module $module } # mm : man/help for Module contents ... a white list https://github.com/PowerShell/PSScriptAnalyzer/blob/master/ ...
Read more >
PSScriptAnalyzer (PSSA) VS-code integration & customization ...
PSScriptAnalyzer (PSSA) VS-code integration & customization Compatibility Analysis by Christoph BergmeisterThe default setup of PSSA does ...
Read more >
VS Code Error - command 'PowerShell.SelectPSSARules' not ...
... Now you can start the PSScriptAnalyzer Rules command ( Ctrl+Shift+P and type Powershell: Select PSScriptAnalyzer Rules ).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found