PowerShell / PowerShell/PSScriptAnalyzer
Autoformat option to automatically wrap object properties in single quotes
未关闭
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 2.2k
- 派生
- 414
- 平均合并
- 13 小时 1 分钟
- 30 天内合并 PR
- 2
描述
Summary of the new feature
I prefer to have all $Object.'properties' wrapped in single quotes.
- Makes it easy to see whats a property and whats a method.
- Uniformity for all properties: Properties with characters like whitespace must be wrapped in single or double quotes.
Today I do this manually. Would be awesome with an autoformat rule that wraps properties into string single quotes.
Proposed technical implementation details (optional)
Before autoformat:
$Object.property
$Object.method()
After autoformat:
$Object.'property'
$Object.method()
What is the latest version of PSScriptAnalyzer at the point of writing
v1.24.0
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定文件或测试入口点;请先定位 PSScriptAnalyzer 的 formatter 实现和现有的 autoformat 规则。使用 issue 中修改前/修改后的示例来确定预期行为,并验证属性访问会获得单引号,而方法调用保持不变。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- powershell
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100