PowerShell / PowerShell/PSScriptAnalyzer
Warn on using incomplete parameter name
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 415
- Avg merge
- 13h 1m
- Merged PRs (30d)
- 2
Description
You open your script up to a future breaking change if you use a command parameter and not specifying the full parameter name. For instance, say I use Get-Foo -R in Foo module v1 where Get-Foo has only one switch parameter -Recurse. This works until Foo v2 comes out and the author has add a new parameter to Get-Foo called -Rollback. Now all of a sudden that script with Get-Foo -R will start failing due to an ambiguous parameter name.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the analyzer entry point that handles PowerShell command parameters. Reproduce the Get-Foo -R scenario with two parameters sharing that prefix, then determine the expected warning behavior and add coverage for incomplete and ambiguous parameter names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100