`PSUseCompatibleCmdlets` says `Install-Module` is not compatible with `desktop-5.1.14393.206-windows`
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
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.
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
- Ngôn ngữ chính
- C#
- Star
- 2.2k
- Fork
- 415
- Merge trung bình
- 13 giờ 1 phút
- Pull request đã merge (30 ngày)
- 2
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.
Issue khác của PowerShell/PSScriptAnalyzer
-
Up-for-Grabs
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
PowerShell/PSScriptAnalyzer#2213 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
PowerShell/PSScriptAnalyzer#2217 · 1 bình luận ·
-
PSUseConsistentIndentation double-indents attribute bodies that open a scriptblock (`[Attr({ … })]`) Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
PowerShell/PSScriptAnalyzer#2216 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
PowerShell/PSScriptAnalyzer#2211 ·
-
`PSPlaceOpenBrace` and `PSPlaceCloseBrace` leave trailing whitespace when expanding one-line blocks Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
PowerShell/PSScriptAnalyzer#2210 ·
Tất cả issue của PowerShell/PSScriptAnalyzer
Issue tương tự
-
Status: Waiting triage Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
nanoframework/Home#1857 ·
-
kind/bug kind/regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
unoplatform/uno.toolkit.ui#1646 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nightscout/nocturne#1379 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
elastic/esql-dotnet#47 ·
-
port: add go-steam fork Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100