PowerShell / PowerShell/PSScriptAnalyzer
Add a rule to alert `catch [RuntimeException] { ... }`
@JamesWTruher đang làm issue này rồi.
Từ ngày 27/9/2022.
- 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ả
Summary of the new feature
In practice, catch [System.Management.Automation.RuntimeException] { ... } behaves the same as an unqualified catch block. That is, it catches any exception. See details in https://github.com/PowerShell/PowerShell/issues/16392.
Reason for that is explained in https://github.com/PowerShell/PowerShell/issues/16392#issuecomment-966712592.
Proposed technical implementation details (optional)
It would be nice to have a rule to caution against using RuntimeException as the type for a catch clause.
What is the latest version of PSScriptAnalyzer at the point of writing
1.20.0
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.
Đánh giá
Issue này chưa được đánh giá.