PowerShell / PowerShell/PSScriptAnalyzer
Flag usage of >< etc when -gt, -lt, etc should be used
未關閉
還沒有人認領這個 Issue。
Issue-Enhancement
Up-for-Grabs
- 主要語言
- C#
- 星號
- 2.2k
- 分支
- 414
- 平均合併
- 13 小時 1 分鐘
- 30 天內合併 PR
- 2
描述
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
Summary
I would like the Visual Studio Code editor to flag usage of >< !=, etc as possibly incorrect if used in a conditional.
I go back and forth between languages and I inadvertently use C#/TypeScript syntax in conditionals and then it takes a while to find my error. An error/warning/hint that I am probably using the incorrect syntax would be great.
Proposed Design
No response
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先檢視 issue #1900,以及檢查 PowerShell 條件運算式的 PSScriptAnalyzer analyzer 進入點;payload 未指定特定檔案或測試。判斷診斷應如何區分條件中的這些運算子,然後新增 coverage 以顯示預期的警告或提示,並確認 analyzer 會回報該問題,而不會標記有效的語法。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp, powershell, vscode
- 領域
- devtools, tooling
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100