PowerShell / PowerShell/PSScriptAnalyzer
"Reserved prefixes" rule
還沒有人認領這個 Issue。
- 主要語言
- C#
- 星號
- 2.2k
- 分支
- 415
- 平均合併
- 13 小時 1 分鐘
- 30 天內合併 PR
- 2
描述
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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
尚未找出任何實作檔案或測試。先定位現有的 PSScriptAnalyzer 規則進入點,並檢視 PowerShell 命令名稱和模組的表示方式;接著釐清保留前綴的來源、警告行為和驗收標準,再實作或測試該規則。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp, powershell
- 領域
- tooling
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100