PowerShell / PowerShell/PSScriptAnalyzer
Should Script Analyzer deal with binary modules?
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ả
Here's a thought that just came to mind while discussing pluralized nouns in more Azure cmdlets with another MVP:
If a module author creates a binary module with cmdlets that have pluralized nouns, I think (haven't specifically tested these scenarios myself) they can package that up in a module in one of two lazy ways:
- Drop the dll into a folder with the same name as the dll (minus the extension), and voila, it's auto-discoverable via PowerShell if it's in the right path.
- Drop the dll into a folder with the same name as the dll, along with a manifest with the same name so that you get versioning, have the manifest load the binary module, but leave the default '*' values for all Export_whatever_ manifest attributes so that all cmdlets are exported.
In both of these scenarios, there is nothing that PSScriptAnalyzer can do to flag issues like pluralized nouns or non-standard verbs, is there? Does PSScriptAnalyzer even check a manifest for pluralized nouns in the exported command names, if they are listed?
I started thinking about this because I was wondering how/why so many pluralized nouns were getting included in released modules from the AzureRM group, and if they use binary cmdlets, this may be one of the reasons why. I'm looking forward to PSScriptAnalyzer evolving into simply PSAnalyzer or perhaps adopting a PSModuleAnalyzer sibling that can check for these types of issues, either by loading modules as part of the inspection or, preferably, by inspecting with reflection or other means the contents of binary modules for issues with command naming and attribute use.
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, bài kiểm thử hoặc điểm vào nào được nêu tên. Trước tiên, hãy xem xét cách PSScriptAnalyzer hiện xử lý các mô-đun và manifest, sau đó xác định liệu có thể kiểm tra tên lệnh của các mô-đun nhị phân hay không; để được xem là hoàn tất, cần xác định phạm vi phát hiện danh từ ở dạng số nhiều và động từ không theo chuẩ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ệ
- csharp, 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
- 25/100