PowerShell / PowerShell/PSScriptAnalyzer

Additional settings file for developement

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

还没有人认领这个 Issue。

主要语言
C#
星标
2.2k
派生
414
平均合并
13 小时 1 分钟
30 天内合并 PR
2

描述

Summary of the new feature

There is currently one PSScriptAnalyzerSettings.psd1 file shipped with the PSScriptAnalyzer but there are at least two use cases with a different requirement:

  • Design-time
    During this phase (often done is VSCode or Visual Studio), any cutting-edge alert for a potential PowerShell pitfall is welcome.

  • Continuous Integration
    During this phase (e.g. in a CI/CD street), any change is supposed to passed the given tests.

Apparently, there is a (undocumented?) convention that our convention is to ship it opt-in via ConfigurableRule with Enable = false but that convention only satisfies the builder phase.

Proposed technical implementation details (optional)

Ship the PSScriptAnalyzer with an additional settings file that is focused on the development phase.
The "development" settings file might than be used as a default by e.g. VSCode (powershell.scriptAnalysis.settingsPath).

Caveats

What is the latest version of PSScriptAnalyzer at the point of writing

1.25.0

贡献指南

打开贡献指南

从这里开始

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

调研方向

从随附的 PSScriptAnalyzerSettings.psd1 和 issue 中提到的 VSCode powershell.scriptAnalysis.settingsPath 设置开始。比较设计时和 CI 的要求,然后确定面向开发的规则以及应如何随附额外文件。完成的标准是:在不更改现有设置文件的情况下,提供一个单独的开发设置文件。

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

评估

技术栈
powershell, vscode
领域
developer-experience, tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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