PowerShell / PowerShell/PSScriptAnalyzer

Additional settings file for developement

Open
#2,184 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
2.2k
Forks
414
Avg merge
13h 1m
Merged PRs (30d)
2

Description

Summary of the new feature

There is currently one PSScriptAnalyzerSettings.psd1 file shipped with the PSScriptAnalyzer but there are at least two use cases with a different requirement:

  • Design-time
    During this phase (often done is VSCode or Visual Studio), any cutting-edge alert for a potential PowerShell pitfall is welcome.

  • Continuous Integration
    During this phase (e.g. in a CI/CD street), any change is supposed to passed the given tests.

Apparently, there is a (undocumented?) convention that our convention is to ship it opt-in via ConfigurableRule with Enable = false but that convention only satisfies the builder phase.

Proposed technical implementation details (optional)

Ship the PSScriptAnalyzer with an additional settings file that is focused on the development phase.
The "development" settings file might than be used as a default by e.g. VSCode (powershell.scriptAnalysis.settingsPath).

Caveats

What is the latest version of PSScriptAnalyzer at the point of writing

1.25.0

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 with the shipped PSScriptAnalyzerSettings.psd1 and the VSCode powershell.scriptAnalysis.settingsPath setting mentioned in the issue. Compare the design-time and CI requirements, then determine the development-focused rules and how the additional file should be shipped. Done means a separate development settings file is available without changing the existing settings file.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.