PowerShell / PowerShell/PSScriptAnalyzer
Make custom rule name consistent
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ả
Apologies if I am repeating something or if this has been discussed already. This is mostly an re-iteration of https://github.com/PowerShell/PSScriptAnalyzer/issues/1140#issuecomment-488251888
As of now, custom rule names are inconsistent across various places.
- At first, there are no indication about function name in the ScriptRuleDocumention.md . But PSSA is completely depends on
$MyInvocation.InvocationNamefor rule/violation name - I can not really have a customized rule name, it should be the name of the PS function. That gives me a weird naming of rules like
Measure-Something. On the other I can ship the violation with whatever name I like which has no value and can break things. - While suppressing a custom rule, I will have to provide
<ModuleName>\<RuleName>. That would end up something like,FooBar\Measure-Something- I really do not like this convention as I do not want the developer to be aware of the module name or the function name.
- It gets worst further, While filtering a rule, I can not follow the same convention, it has to be the name whatever the function name.
Invoke-ScriptAnalyzer -IncludeRule Measure-Something -ExcludeRule Measure-SomethingElse
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 ScriptRuleDocumentation.md và hành vi của Invoke-ScriptAnalyzer IncludeRule/ExcludeRule cũng như suppression được mô tả ở đây; xem lại phần thảo luận của issue được liên kết để nắm bối cảnh trước đó. Công việc được coi là hoàn tất khi quy ước đặt tên cho các rule tùy chỉnh đã được quyết định và được áp dụng nhất quán cho tài liệu, tên các vi phạm, suppression và filtering.
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
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100