PowerShell / PowerShell/PowerShellEditorServices
Allow customization of code formatting rules
還沒有人認領這個 Issue。
- 主要語言
- C#
- 星號
- 767
- 分支
- 266
- 平均合併
- 3 天 16 小時
- 30 天內合併 PR
- 1
描述
In this block of code: https://github.com/PowerShell/PowerShellEditorServices/blob/master/src/PowerShellEditorServices.Protocol/Server/LanguageServerSettings.cs#L209
The list of PSScriptAnalyzer rules used to perform the Formatting function is hard-coded. It would be nice to have a way of extending this list to include custom rules. For example, I have one that removes any trailing whitespace from lines, but it doesn't run if I use VSCode's "Format Document" or "Format Selection" actions.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 src/PowerShellEditorServices.Protocol/Server/LanguageServerSettings.cs 中第 209 行附近的格式化規則清單開始。追蹤 Format Document 和 Format Selection 動作如何使用該清單,接著判斷應如何提供自訂 PSScriptAnalyzer 規則,並將其納入兩條路徑。完成的標準是,使用者可以擴充格式化規則,且其自訂規則會透過這些編輯器動作執行。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp, powershell
- 領域
- developer-experience, tooling
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100