Skip to content

Add option to specify paths for ScriptAnalyzer-evaluation #3048

Open
@fflaten

Description

@fflaten

Summary of the new feature

This extension should include a setting to specify which paths to run Script Analysis against. Currently the extension reads the PSScriptAnalyzer.psd1-file in workspace root (if not modified) and executes PSSA against all files recursively.

Let's say you only want to run the rules against src/* and tool/*. AFAIK this can't be configured in the extension nor PSScriptAnalyzer.psd1, which can result in many unnecessary problems and warnings in folders without the same requirements to follow best practices.

Proposed technical implementation details (optional)

Invoke-ScriptAnalyzer solves this problem by requiring a Path or ScriptDefinition parameter. As the extension uses the latter option, then the logic and paths-setting would have to be part of the Script Analysis-part of vscode-powershell + PowerShellEditorServices.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions