PowerShell / PowerShell/PSScriptAnalyzer
unary operators not getting spaced
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 2.2k
- 派生
- 414
- 平均合并
- 13 小时 1 分钟
- 30 天内合并 PR
- 2
描述
Following up from #847 / #948,
PSSA 1.18.0 Invoke-Formatter no longer inserts a space between letter/word based unary operators, such as -split or -not.
If I use the format selection command in VS Code I get a different result, but I am suspecting that VSCode / PowerShell Extension is still using PSSA 1.17.x.
I suspect this is from trying not to space out the unary 'negate' or 'positive' operators. Probably a simple idea might be to look at the length of the operator, length > 2 should be spaced.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从针对 -split 和 -not 等基于单词的一元运算符所描述的 Invoke-Formatter 行为开始,并将其与 VS Code 的格式化结果进行比较。确定这些运算符相对于一元否定运算符和正运算符应采用的间距;当 formatter 输出始终一致地应用所选规则时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- powershell
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100