Improve Usability of PSScriptAnalyzer.psd1
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- powershell
- 领域
- tooling
调研方向
从 PSScriptAnalyzer.psd1 和 issue 中链接的 AvoidUsingCmdletAliases 文档开始。添加 Rules 成员并运行 Import-Module PSScriptAnalyzer 来复现故障。当文档中的规则配置可以在不出现 manifest-invalid-members 错误的情况下使用时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Summary of the new feature
According to the docs it's as simple as adding rules to the Rules HashMap in PSScriptAnalyzer.psd1:
PSScriptAnalyzer.psd1
@{
Rules = @{
'PSAvoidUsingCmdletAliases' = @{
'allowlist' = @('cd', 'cls', 'copy', 'cp'')
}
}
# Author of this module
Author = 'Microsoft Corporation'
...
Followed by running:
Import-Module PSScriptAnalyzer
However, in practice this does not work at all:
Import-Module: The '...\ms-vscode.powershell-2025.0.0\modules\PSScriptAnalyzer\1.23.0\PSScriptAnalyzer.psd1' module cannot be imported because its manifest contains one or more members that are not valid. The valid manifest members are ('ModuleToProcess', 'NestedModules', 'GUID', 'Author', 'CompanyName', 'Copyright', 'ModuleVersion', 'Description', 'PowerShellVersion', 'PowerShellHostName', 'PowerShellHostVersion', 'CLRVersion', 'DotNetFrameworkVersion', 'ProcessorArchitecture', 'RequiredModules', 'TypesToProcess', 'FormatsToProcess', 'ScriptsToProcess', 'PrivateData', 'RequiredAssemblies', 'ModuleList', 'FileList', 'FunctionsToExport', 'VariablesToExport', 'AliasesToExport', 'CmdletsToExport', 'DscResourcesToExport', 'CompatiblePSEditions', 'HelpInfoURI', 'RootModule', 'DefaultCommandPrefix').
Remove the members that are not valid ('Rules'), then try to import the module again.
I am sure this is just a beginners mistake and CAN work but it SHOULD JUST work.
Proposed technical implementation details (optional)
A clear and concise description of what you want to happen.
What is the latest version of PSScriptAnalyzer at the point of writing
1.24.0
- 主要语言
- C#
- 星标
- 2.2k
- 派生
- 422
- 平均合并
- 2 小时 23 分钟
- 30 天内合并 PR
- 25
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PowerShell/PSScriptAnalyzer 的其他 Issue
-
Up-for-Grabs
难度 1/5 1-3 小时 新手友好度 78/100
PowerShell/PSScriptAnalyzer#2213 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 1-2 天 新手友好度 18/100
PowerShell/PSScriptAnalyzer#2302 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
PowerShell/PSScriptAnalyzer#2300 ·
维护者通常 1 天内回复
-
Invoke-ScriptAnalyzer fails intermittently with NullReferenceException in CommandInfo.ResolveParameter (ProvideCommentHelp / AvoidReservedCharInCmdlet race on Export-ModuleMember)可能已有人在做 @jessehouwing 于 89 天前认领。 未关闭Issue - Bug
难度 4/5 3-5 天 新手友好度 52/100
PowerShell/PSScriptAnalyzer#2229 · 6 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 32/100
PowerShell/PSScriptAnalyzer#2222 · 2 条评论 ·
维护者通常 1 天内回复
查看 PowerShell/PSScriptAnalyzer 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
GamaEdtech/gamatrain-back#977 ·
维护者通常 1 天内回复
-
area-templates triage:bot-seen triage:needs-human
难度 2/5 1-3 小时 新手友好度 75/100
microsoft/aspire#22356 · 1 条评论 ·
维护者通常 1 天内回复
-
Needs-Triage
难度 2/5 1-3 小时 新手友好度 84/100
PowerShell/PowerShell#28432 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/aspire.dev#2184 ·
维护者通常 2 天内回复
-
area-controls-refreshview platform/ios s/triaged
难度 2/5 1-3 小时 新手友好度 74/100
dotnet/maui#40314 · 1 个 reaction ·
维护者通常 1 天内回复