PowerShell / PowerShell/PSScriptAnalyzer
Feature request: Mark specific lines or blocks to ignore for specific rules
未关闭
还没有人认领这个 Issue。
Issue - Enhancement
- 主要语言
- C#
- 星标
- 2.2k
- 派生
- 414
- 平均合并
- 13 小时 1 分钟
- 30 天内合并 PR
- 2
描述
Like pragma in c# can disable a warning for a line and then enable it again.
As an example, I've got a few variables that are used to within Invoke-Expression's, and the script analyzer flags them as unused variables but they are actually used. I dont want to ignore the rule for the entire script, just these few variables.
Is there a way to do this?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
该 issue 要求针对单个 PowerShell 行或代码块进行规则特定的抑制,尤其是对 Invoke-Expression 中使用的变量进行抑制。未指定文件、测试或入口点;请先定位现有的规则抑制行为,并确定应如何表示行和代码块的作用域。完成后应支持抑制选定的规则,而不会对整个脚本禁用这些规则。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, powershell
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100