PowerShell / PowerShell/vscode-powershell

PSScriptAnalyzer problems don't refresh after changing the settings file

Open
#3,168 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Script Analysis Issue-Enhancement Up for Grabs
Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

Issue Description

I am experiencing a problem with problems not refreshing after changing the settings file.

Steps to reproduce

  1. Open a PowerShell script with at least one problem.
  2. Open the PSScriptAnalyzerSettings.psd1 file.
  3. Add the name of the rule that's causing the problem under the ExcludeRules key.
  4. Go back to the initial script.

Current behaviour

The problem doesn't disappear.

Expected behaviour

The problem should disappear.

Attached Logs

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

1612637680-c7543aa0-3145-4deb-9204-e328d43685271612637672916.zip

Environment Information

Visual Studio Code

Name Version
Operating System Darwin x64 20.3.0
VSCode 1.53.0
PowerShell Extension Version 2020.6.0

PowerShell Information

Name Value
PSVersion 7.1.1
PSEdition Core
GitCommitId 7.1.1
OS Darwin 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021, root:xnu-7195.81.3~1/RELEASE_X86_64
Platform Unix
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.1
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
cpptools ms-vscode 1.2.0
platformio-ide platformio 2.2.1
powershell ms-vscode 2020.6.0
prettier-vscode esbenp 5.9.1
remote-containers ms-vscode-remote 0.158.0
vetur octref 0.32.0
vscode-docker ms-azuretools 1.9.1
vscode-typescript-tslint-plugin ms-vscode 1.3.3
vsliveshare ms-vsliveshare 1.0.3629

Moved from https://github.com/microsoft/vscode/issues/115988.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the problem in VS Code with a PowerShell script and PSScriptAnalyzerSettings.psd1, then follow docs/troubleshooting.md to capture logs. Trace how changing ExcludeRules affects the script's reported problems; done means the excluded diagnostic disappears after returning to the script.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, typescript, vscode
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.