PowerShell / PowerShell/PSScriptAnalyzer
Parameter Help auto generation in PowerShell Functions
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C#
- Star
- 2.2k
- Fork
- 414
- Merge trung bình
- 13 giờ 1 phút
- Pull request đã merge (30 ngày)
- 2
Mô tả
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
Summary
If you go above the parameter block of a function and write "##" the parameter help template is pre-generated automatically by the PowerShell Extension. However currently this generates:
<#
.SYNOPSIS
Short description
.DESCRIPTION
Long description
.PARAMETER exampleParam
Parameter description
.EXAMPLE
An example
.NOTES
General notes
#>
However, it is best practice to also specify the return value of your function by using ".OUTPUTS", therefore it would be nice if this could be added to the default template / if the default template could be configured in the settings.json.
Proposed Design
This could be accomplished by either:
Static Design
Add ".OUTPUTS" to the current template
Dynamic Design
Add the possibility to specify the fields in the template in a list like:
"powershell.extentention" : {
"parameterHelp" : {
"generatorTemplateFields" : [
".SYNOPSIS", ".DESCRIPTION", ".PARAMETER", ".EXAMPLE", ".NOTES", ".OUTPUTS"
]
}
}
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
Không có tệp hoặc kiểm thử nào được nêu tên. Hãy bắt đầu bằng cách xác định trình tạo trợ giúp tham số và các định nghĩa cài đặt cho tiện ích mở rộng PowerShell, sau đó so sánh template hiện có với trường .OUTPUTS được đề xuất và cài đặt generatorTemplateFields. Công việc được xem là hoàn tất khi либо .OUTPUTS được thêm vào trợ giúp được tạo, либо các trường template có thể cấu hình được ghi chép và triển khai, kèm theo mức độ bao phủ cho hành vi đã chọn.
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
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- 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
- 30/100