Default completer for `SuppressMessageAttribute` sets invalid parameter value for `checkId`
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- powershell, typescript, vscode
- Lĩnh vực
- developer-experience, tooling
Hướng nghiên cứu
Bắt đầu bằng cách tìm định nghĩa tự động hoàn thành của SuppressMessageAttribute trong tiện ích mở rộng PowerShell của VS Code và tái hiện phần hoàn thành được mô tả trong issue. Theo dõi đối số checkId được tạo ra và cập nhật phần hoàn thành để việc suppression hoạt động với giá trị chuỗi rỗng thay vì $null. Sau đó, xác minh rằng cảnh báo PSSUseShouldProcessForStateChangingFunctions đã tái hiện được suppression.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Prerequisites
- I have written a descriptive issue title.
- I have searched all open and closed issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
When adding a SuppressMessageRule using the autosuggest functionality it sets the checkId parameter to $null rather than '' which does not correctly suppress the PSSA rule.
PowerShell Version
┏[MichaelO'Toole][dev]
┖[R:\Development\NinjaGet]> $PSVersionTable
Name Value
---- -----
PSVersion 7.3.5
PSEdition Core
GitCommitId 7.3.5
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visual Studio Code Version
┏[MichaelO'Toole][dev]
┖[R:\Development\NinjaGet]> code --version
1.79.2
695af097c7bd098fbf017ce3ac85e09bbc5dda06
x64
Extension Version
┏[MichaelO'Toole][dev]
┖[R:\Development\NinjaGet]> code --list-extensions --show-versions | Select-String powershell
ms-vscode.powershell@2023.6.0
Steps to Reproduce
Create a blank PS function with a verb that can change system state with the PSSUseShouldProcessForStateChangingFunctions rule enabled - add the suppress rule from the auto complete - note that the warning remains.
Alter the second parameter to '' instead of $null and notice suppression works.
Visuals
No response
Logs
No response
- Ngôn ngữ chính
- TypeScript
- Star
- 1.9k
- Fork
- 548
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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/vscode-powershell
-
[aw] Agentic Issue Triage failed Đang mởagentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
PowerShell/vscode-powershell#5599 · 3 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
PowerShell/vscode-powershell#5592 · 2 bình luận · 1 reaction ·
-
[aw] Agentic Issue Triage failed Đang mởagentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
PowerShell/vscode-powershell#5583 · 1 bình luận ·
-
powershell.scriptAnalysis.settingsPath (Description): Warning Message Should Provide A Workaround Đang mởArea-Code Formatting Issue-Enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
PowerShell/vscode-powershell#4653 · 3 bình luận · 4 reaction ·
-
nothing Đang mởIssue-Bug Needs: Triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 5/100
PowerShell/vscode-powershell#5603 · 1 reaction ·
Tất cả issue của PowerShell/vscode-powershell
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
0xMiden/bridge-portal#132 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
area:tools bug good first issue help wanted priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
newrelic-experimental/preflight#793 · 1 bình luận ·