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