PowerShell / PowerShell/PSScriptAnalyzer
Implementing interface in PowerShell class does not warn about non-implemented interface members
未关闭
还没有人认领这个 Issue。
Area - Rules
Issue - Enhancement
Issue - New Rule
- 主要语言
- C#
- 星标
- 2.2k
- 派生
- 414
- 平均合并
- 13 小时 1 分钟
- 30 天内合并 PR
- 2
描述
System Details
System Details Output
### VSCode version: 1.47.3 91899dcef7b8110878ea59626991a18c8a6a1b3e x64
### VSCode extensions:
DavidAnson.vscode-markdownlint@0.36.2
eamodio.gitlens@10.2.2
Fudge.auto-using@0.7.15
jchannon.csharpextensions@1.3.1
k--kato.docomment@0.1.17
mhutchie.git-graph@1.25.0
ms-azuretools.vscode-docker@1.4.1
ms-dotnettools.csharp@1.22.1
ms-vscode-remote.remote-wsl@0.44.4
ms-vscode.cpptools@0.29.0
ms-vscode.powershell@2020.6.0
ms-vscode.powershell-preview@2020.7.0
redhat.vscode-xml@0.13.0
streetsidesoftware.code-spell-checker@1.9.0
zhuangtongfa.material-theme@3.8.5
### PSES version: 2.3.0.0
### PowerShell version:
Name Value
---- -----
PSVersion 7.1.0-preview.5
PSEdition Core
GitCommitId 7.1.0-preview.5
OS Microsoft Windows 10.0.19041
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Issue Description
PowerShell class implementing an interface does not create an error if required interface members are not present. There is also not a code action to implement interface.
using namespace System.Management.Automation
class test : IArgumentCompleter
{
}
Expected Behaviour
VS code warns about non-implemented interface members like C#. Code action to implement interface.
Actual Behaviour
VS code does not warn about non-implemented interface members or show code action to resolve.

Attached Logs
Follow the instructions in the troubleshooting docs
about capturing and sending logs.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从实现 IArgumentCompleter 的 PowerShell 类示例开始,并检查 PSScriptAnalyzer 如何报告缺少的接口成员。如果需要诊断日志,请使用故障排除文档。完成的标准是编辑器会警告未实现的接口成员,并提供用于实现它们的代码操作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, powershell
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100