-
Notifications
You must be signed in to change notification settings - Fork 395
PSScriptAnalyzer rule changes not sticky using PowerShell/vscode-powershell #975
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
Comments
@alx9r Hi, thanks for the info. I was not aware that those VsCode settings do not get persisted and as you said it is a bug in the VsCode extension and not PSSA itself. However, I can offer you an alternative to save your settings (this is how I manage the settings myself): Just use the |
Hi @bergmeister. Thanks for helping me with this. I like the concept you described, but I haven't gotten it working. I thought I followed your directions faithfully, but I'm seeing when I select "PowerShell: Select ScriptAnalyzer Rules" from the command pallette. Here is a minimal project folder that repros the problem: PssaVscode.zip Could you see if you see the same error using that project on your computer? I'd like to get such a minimal project folder working so that I can use it as a reference for all my projects. |
@alx9r Hi, yes, I have the same behaviour in my checkout and I think the extension is correct to display this error because the PSSA rules are now defined inside the settings file that you would need to modify instead if you want to enable/disable a rule. Modifying the file instead of using the menu is not as nice but should still be sufficient to solve your problem. |
@bergmeister
I think I will. I'd like to suggest an improved message in that notification I posted above to avert this confusion. Would you be able to suggest some wording as a starting point? I'm thinking that anyone who encounters that error should find a low-friction path to the same explanation you gave me.
There's no apology necessary to me. I do think an improved error/warning message would assuage the downside of that feature being only partially implemented. Currently, it's a liability to productivity for anyone who tries to use it. |
@alx9r Thanks. I will close the issue then if that is OK with you? |
I understand that the fault may lie with PowerShell/vscode-powershell. I'm opening this bug here for the following reasons:
Steps to reproduce
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
The text was updated successfully, but these errors were encountered: