PowerShell / PowerShell/PSScriptAnalyzer
Documentation for implementing rules in a .NET assembly
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've just missed something, but I can't seem to find much in the way of documentation for implementing rules in a .NET assembly. I took a stab at it anyway by creating a class that implements IScriptRule, but ScriptAnalyzer can't seem to find it. I just get something like:
Invoke-ScriptAnalyzer : Exception of type 'System.Exception' was thrown.
At line:1 char:1
+ Invoke-ScriptAnalyzer -Path C:\local\test.ps1 -Cu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceExists: (Microsoft.Windo....ScriptAnalyzer:ScriptAnalyzer) [Invoke-ScriptAnalyzer], Exception
+ FullyQualifiedErrorId : Cannot find ScriptAnalyzer rules in the specified path,Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands.InvokeScriptAnalyzerCommand
I've tried adding an [Export(typeof(IScriptRule))] attribute to my class, but it didn't help.
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 hành vi của IScriptRule và ScriptAnalyzer được mô tả trong báo cáo, sau đó tái hiện lỗi Invoke-ScriptAnalyzer được nêu bằng .NET assembly được tham chiếu. Xác định những chi tiết nào về assembly và lớp mà tài liệu phải giải thích, rồi hoàn thiện tài liệu để người dùng có thể triển khai và phát hiện một rule thành công.
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
- documentation
- Loại issue
- Tài liệu
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- 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