PowerShell / PowerShell/PSScriptAnalyzer

"Reserved prefixes" rule

Open
#1,198 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue - New Rule Up-for-Grabs
Dominant language
C#
Stars
2.2k
Forks
414
Avg merge
13h 1m
Merged PRs (30d)
2

Description

Summary of the new feature

A while ago, the PowerShell extension had an issue open on it because

Get-Help Get-AdUser -Online

and

Get-Help Get-AdFoo -Online

(note, Foo is used to make it obvious and I forget what the actual noun was)

Were not giving the same result...

As it turned out, its because Get-AdFoo was from a module from the Gallery... Where Get-AdUser comes from the inbox Active Directory module.

Personally, I think it's quite dodgy to overload such a crucial prefix like Ad and we should warn users that certain prefixes are used already in very critical modules.

Proposed technical implementation details (optional)

A rule that gives a warning that says "you probably shouldn't use this prefix because it's already used by X"

Or something to that effect.

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

1.18.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

No implementation files or tests are identified. Start by locating the existing PSScriptAnalyzer rule entry points and examining how PowerShell command names and modules are represented; then clarify the reserved-prefix source, warning behavior, and acceptance criteria before implementing or testing the rule.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.