Skip to content

A relative path in powershell.scriptAnalysis.settingsPath deactivates all PSSA rules in workspaces without such a file #2287

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
mklement0 opened this issue Nov 5, 2019 · 2 comments
Assignees
Labels
Resolution-Duplicate Will close automatically.

Comments

@mklement0
Copy link
Contributor

System Details

System Details Output

### VSCode version: 1.39.2 6ab598523be7a800d7f3eb4d92d7ab9a66069390 x64

### VSCode extensions:
[email protected]

### PSES version: 1.13.1.0

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.5
PSEdition                      Core
GitCommitId                    7.0.0-preview.5
OS                             Darwin 19.0.0 Darwin Kernel Version 19.0.0: Thu Oct 17 16:17:15 PDT 2019; root:xnu-6153.41.3~29/RELEASE_X86_64
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Description

A relative path in setting powershell.scriptAnalysis.settingsPath is designed to work on a per-workspace basis, by pointing to a workspace-root-relative path.

Expected Behaviour

If a given workspace (or VSCode having been opened without a folder) happens to have no settings file specified in the relative path, the default PSSA rules should apply.

Actual Behaviour

If the workspace-relative settings file doesn't exist, all PSSA rules are seemingly deactivated.

The behavior can easily be verified by referencing a non-existent file-name-only *.psd1 file in settings.json, such as with:

"powershell.scriptAnalysis.settingsPath": "nosuch.psd1"
@rjmholt
Copy link
Contributor

rjmholt commented Nov 12, 2019

Going to mark this as a duplicate of #2190, since the implementation there will solve this issue.

@ghost
Copy link

ghost commented Nov 13, 2019

This issue has been marked as duplicate and has not had any activity for 1 day. It has been closed for housekeeping purposes.

@ghost ghost closed this as completed Nov 13, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate Will close automatically.
Projects
None yet
Development

No branches or pull requests

3 participants