PowerShell / PowerShell/PSScriptAnalyzer
Update PSUseCorrectCasing to enforce correct casing of language keywords
未关闭
还没有人认领这个 Issue。
Issue - Enhancement
Up-for-Grabs
- 主要语言
- C#
- 星标
- 2.2k
- 派生
- 414
- 平均合并
- 13 小时 1 分钟
- 30 天内合并 PR
- 2
描述
Summary of the new feature
Incorrect case of language keywords should result in a PSUseCorrectCasing rule violation.
A list of keywords can be obtained by reflection:
[ref].Assembly.GetType('System.Management.Automation.Language.Tokenizer').
GetDeclaredField('_keywordText').
ForEach{ $PSItem.GetValue($null) }
elseif
if
else
switch
foreach
from
in
for
while
until
do
try
catch
finally
trap
data
return
continue
break
exit
throw
begin
process
end
dynamicparam
function
filter
param
class
define
var
using
workflow
parallel
sequence
inlinescript
configuration
public
private
static
interface
enum
namespace
module
type
assembly
command
hidden
base
What is the latest version of PSScriptAnalyzer at the point of writing
1.19.0
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 PSUseCorrectCasing 规则和通过 Tokenizer 反射获取的 PowerShell 关键字列表开始。检查该规则当前如何检测大小写违规,然后覆盖列出的关键字,并验证大小写不正确的语言关键字会被报告,而大小写正确的关键字会被接受。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, powershell
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100