-SaveDscDependency does not work on Microsoft-hosted 'ubuntu-latest' agents
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng cách chạy Invoke-ScriptAnalyzer với -SaveDscDependency trên một agent ubuntu-latest do Microsoft lưu trữ và so sánh với windows-latest, sử dụng các module DSC được báo cáo và RestrictRDPForLocalAccounts.ps1. Được xem là hoàn tất khi các module DSC được tải xuống và các tệp script được quét mà không có các lỗi phân tích cú pháp đã báo cáo.
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 -Path . -Recurse -ReportSummary -SaveDscDependency -EnableExit
We have some new scripts which rely on DSC modules (for example 'nxtools', 'PSDscResources' and 'SecurityPolicyDSC'). RestrictRDPForLocalAccounts.ps1 is one of the PowerShell script files that used DSC modules. While executing the PSScriptAnalyzer scan with the -SaveDscDependency option on the Microsoft-hosted 'ubuntu-latest' agents in our CI/CD pipeline, the DSC modules are not saved:
The same command works fine on Microsoft-hosted 'windows-latest' agents:
Expected behavior
The DSC modules are downloaded and the script files are scanned the same way as on Windows.
Actual behavior
The DSC modules are not downloaded and the scan list parse errors.
Environment data
Microsoft-hosted 'ubuntu-latest' agents
PowerShell 7.4.7
PSScriptAnalyzer: 1.24.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 ·