PowerShell / PowerShell/PSScriptAnalyzer
PSDSCStandardDSCFunctionsInResource
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C#
- Star
- 2.2k
- Fork
- 415
- Merge trung bình
- 13 giờ 1 phút
- Pull request đã merge (30 ngày)
- 2
Mô tả
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?
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với rule PSDSCStandardDSCFunctionsInResource và tái hiện báo cáo bằng resource VE_XD7WaitForSite được liên kết trong issue. Xác định xem các function được import từ file .ps1 của file .psm1 có phải đáp ứng rule hay không; hoàn thành nghĩa là resource hợp lệ không còn bị báo cáo, trong khi các resource thực sự thiếu Get-, Set- hoặc Test-TargetResource vẫn là lỗi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- powershell
- Lĩnh vực
- tooling
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100