PowerShell / PowerShell/PSScriptAnalyzer
`PSUseCompatibleCmdlets` says `Install-Module` is not compatible with `desktop-5.1.14393.206-windows`
Đang mở
Chưa có ai nhận issue này.
Issue - Bug
- 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ả
Steps to reproduce
Invoke-ScriptAnalyzer -ScriptDefinition 'Install-Module -Name ''Foo''' -Settings @{
Rules = @{
PSUseCompatibleCmdlets = @{
Compatibility = @('desktop-5.1.14393.206-windows')
}
}
} | Format-List -Property '*'
Expected behavior
Actual behavior
Line : 1
Column : 1
Message : 'Install-Module' is not compatible with PowerShell edition 'desktop', version '5.1.14393.206' and OS 'windows'
Extent : Install-Module
RuleName : PSUseCompatibleCmdlets
Severity : Warning
ScriptName :
ScriptPath :
RuleSuppressionID :
SuggestedCorrections :
IsSuppressed : False
If an unexpected error was thrown then please report the full error details using e.g. $error[0] | Select-Object *
Environment data
- PowerShell v7.4.6 x64 on Windows 11 24H2 x64
- PSScriptAnalyzer v1.23.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.
Hướng nghiên cứu
Bắt đầu với bản tái hiện PowerShell được cung cấp và kiểm tra quy tắc PSUseCompatibleCmdlets cùng phần tra cứu khả năng tương thích của quy tắc này đối với Install-Module. Xác minh kết quả tương thích mà lệnh báo cáo và xác định kết quả dự kiến cho đích desktop-5.1.14393.206-windows; issue được giải quyết khi quy tắc báo cáo kết quả chính xác và bản tái hiện được bao phủ bởi một test.
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
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- 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
- 35/100