PowerShell / PowerShell/PSScriptAnalyzer
PSDSCStandardDSCFunctionsInResource
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 2.2k
- 派生
- 415
- 平均合并
- 13 小时 1 分钟
- 30 天内合并 PR
- 2
描述
I have recently publish a couple of DSC Resource based modules to the gallery and they're being flagged by the following rule/error:
PSDSCStandardDSCFunctionsInResource Error VE_XD7WaitForSite.psm1 1 Missing 'Set-TargetResource' function. DSC Resource must implement Get, Set and Test-TargetResource functions.
The source for this particular module/error can be found here: https://github.com/VirtualEngine/XenDesktop7/tree/master/DSCResources/VE_XD7WaitForSite.
I assume it is because the .psm1 file doesn't contain the Get-, Test- and Set-TargetResource methods. In my instance, they're imported from a .ps1 file by the .psm1 file! Surely, this cannot be a hard-and-fast requirement?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 PSDSCStandardDSCFunctionsInResource 规则开始,使用 issue 中链接的 VE_XD7WaitForSite 资源重现报告。确定从 .psm1 文件的 .ps1 文件中导入的函数是否应满足该规则;完成的标准是有效资源不再被标记,而真正缺少 Get-、Set- 或 Test-TargetResource 的资源仍然是错误。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- powershell
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100