PowerShell / PowerShell/PSScriptAnalyzer
Normalisation of new lines after pipes in expressions with 2 or more pipes
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 2.2k
- 派生
- 414
- 平均合并
- 13 小时 1 分钟
- 30 天内合并 PR
- 2
描述
Summary of the new feature
Consider the following
$List | Where-Object {
} |
ForEach-Object {
}
This is a formatted piece of PowerShell with the notable feature of using both no new line after the pipe and new line after the pipe. The new rule would normalise the presence of a new line after a pipe across the input data.
The rule would have the option to enforce new lines or enforce no new lines after a pipe.
For example,
$List | Where-Object {
} |
ForEach-Object {
}
would become
$List | Where-Object {
} | ForEach-Object {
}
If there only exists one pipe, then removing a Newline pending its line length could also be within the scope of the feature.
What is the latest version of PSScriptAnalyzer at the point of writing
PS > (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }
1.19.1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
该 issue 未指定任何文件、测试或入口点;首先定位负责处理 pipe 换行的 formatter 入口点。使用提供的混合换行示例定义预期的规范化行为,并明确该规则是否适用于单个 pipe 和行长度限制。选定的 enforcement 选项能够生成一致的输出,并且其行为已由测试覆盖,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- powershell
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100