PowerShell / PowerShell/PSScriptAnalyzer

Download compatibility profiles lazily from a remote feed rather than shipping them

未关闭
#1,148 4 条评论 5 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

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

描述

Currently compatibility profiles for the UseCompatibleTypes and UseCompatibleCommands rules ship with PSSA and effectively double its size.

This represents large overhead for users who don't use these rules or who don't want all the profiles we ship by default.

Ideally the rules should have a way of identifying filesystem and remote assets, and when rules are run, download/install any remote assets not already on the machine. This will also require cataloguing remote assets in a systematic and dependable way.

Proposed implementation

One solution is to have rules as NuGet assets (taking care of both hosting and caching), and specifying profiles as URIs, so that file:// and https:// (for example) profiles can be easily distinguished.

This may create an unnecessary dependency on NuGet however.

Whatever the implementation it will need to:

  • Enable runtime retrieval of profiles so they do not need to be shipped with the PSSA module
  • Allow side-by-side specification of remote and local profiles in the configuration in a way where local assets cannot have colliding names
  • Memoise profile downloads, so that once they are downloaded once, they remain available locally by specifying the remote instance (this may require versioning or cache invalidation in case remote profiles change)
  • Allow profiles to be downloaded in batches rather than one-at-a-time, for maximum efficiency (in the vein of the Remote Façade pattern.

贡献指南

打开贡献指南

从这里开始

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

调研方向

审查 UseCompatibleTypes 和 UseCompatibleCommands 规则,以及它们的配置文件当前是如何打包和配置的。将资产源、缓存和版本控制、本地名称冲突以及批量下载的要求映射到设计中。完成意味着已对列出的运行时获取和共存行为进行规范说明和验证。

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

评估

技术栈
csharp, powershell
领域
tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

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