PowerShell / PowerShell/PSScriptAnalyzer
Documentation for AvoidTrailingWhitespace shouldn't use bad practices for reasoning
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 2.2k
- 派生
- 414
- 平均合并
- 13 小时 1 分钟
- 30 天内合并 PR
- 2
描述
from document file /RuleDocumentation/AvoidTrailingWhitespace.md:
Lines should not end with whitespace characters. This can cause problems with the line-continuation backtick, and also clutters up future commits to source control.
The backtick character is not a "line-continuation" character and using it as such is generally considered bad practice (for the exact reason noted in this document). I feel this shouldn't be listed as a reason for avoiding trailing whitespace since it's saying you should avoid one bad practice to prevent messing with another bad practice.
I feel this should be changed to either:
- Not refer to the backtick character as a "line-continuation character" since that's not what it is and call out this use as bad practice
- Explicitly call out that the use of the backtick character as a "line-continuation character" is considered bad practice
- Remove the reference to the use of the backtick character in the description entirely, since this usage should be avoided in the first place
What is the latest version of PSScriptAnalyzer at the point of writing
1.17.1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
打开 RuleDocumentation/AvoidTrailingWhitespace.md,检查其中关于行尾空白和反引号字符的引用说明。确定三种措辞修改中哪一种最符合项目的文档指导,更新该段内容,并验证其准确描述了这一实践,且不会将反引号当作行延续字符。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- powershell
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100