PowerShell / PowerShell/PSScriptAnalyzer

Code Formatting: Whitespacing ValidateSet

未关闭
#1,125 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Area - Formatter Up-for-Grabs
主要语言
C#
星标
2.2k
派生
415
平均合并
13 小时 1 分钟
30 天内合并 PR
2

描述

Summary of the new feature

I've this validateset:

image

Sometimes I want it to have 2-3 per line so I start removing pressing delete button and I end up with what you see above. It would be nice if I could then press format and it would remove that unnessecary whitespace. While initially I thought it could be all automatic you said on twiter that it may quickly get out of control. I agree of course (even thou I would ant different styles to be available - like 3 validateset params per line) but at least maybe this can be addressed? It's just making sure there is only 1 white space per line (or defined value if it's needed).

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先在 PSScriptAnalyzer 中定位格式化器或格式化命令,并查看现有的空白规则或测试。明确目标是采用一种空白样式,还是让每行的项目数可配置,然后定义涵盖 ValidateSet 示例和预期格式化输出的测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
powershell
领域
tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。