Skip to content

Set the powerShell.scriptAnalysis.settingsFilePath setting to a default for auto-discoverability #2190

Closed
@TylerLeonhardt

Description

@TylerLeonhardt

Summary of the new feature

Most linter tools automatically pick up the config file from the root of your workspace. We should do the same.

I'd like to set the default value for powerShell.scriptAnalysis.settingsFilePath to PSScriptAnalyzerSettings.psd1 which means that if there is a PSScriptAnalyzerSettings.psd1 in the root of the workspace, we will automatically use it.

If a user doesn't want this, they can opt out via:

"powerShell.scriptAnalysis.settingsFilePath":""

but PSSA integration is one of our flagship features so we should streamline the experience.

Also, the user can still set it to something else if they so choose.

Proposed technical implementation details (optional)

Setting the default value for powerShell.scriptAnalysis.settingsFilePath to PSScriptAnalyzerSettings.psd1. Making sure our code is resilient if the file doesn't exist.

I need to hear what @bergmeister has to say about this. Among anyone else :)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions