Skip to content

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

Closed
@mklement0

Description

@mklement0

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"

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions