Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Feature Request: Granular control over workflow validation diagnostics

未关闭
#551 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
github-actions, typescript

调研方向

首先检查扩展目前如何生成 context-access、expression、schema 和其他验证诊断,然后将这些路径与提议的设置进行比较。完成标准应包括一个经过一致同意的配置模型,使用户能够启用验证,并控制或抑制诊断类别,同时不禁用 GitHub Actions 的语言功能。

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

描述

Problem

The extension currently provides no user-configurable settings to control which validation diagnostics are shown in the Problems panel. Users cannot suppress specific categories of warnings/errors without disabling the extension entirely or changing file associations to plain YAML (losing all GitHub Actions language features).

Current Behavior

The extension surfaces diagnostics like:

  • Context access might be invalid: <VAR_NAME> (severity: hint)
  • Expression validation errors
  • Schema validation warnings

These are generated for valid workflow patterns (e.g., outputs set via $GITHUB_OUTPUT and referenced in subsequent jobs) that the static analyzer cannot fully resolve.

Example

jobs:
  build:
    outputs:
      version: ${{ steps.version.outputs.DF_VERSION }}
    steps:
      - id: version
        run: echo "DF_VERSION=$(cat VERSION)" >> $GITHUB_OUTPUT
  
  deploy:
    needs: build
    steps:
      - run: echo "Deploying ${{ needs.build.outputs.DF_VERSION }}"
        # ⚠️ "Context access might be invalid: DF_VERSION"

The warning is a false positive—the workflow is correct, but the extension cannot trace the dynamic output.

Requested Feature

Add granular settings to control validation behavior, for example:

{
  "github-actions.validation.enabled": true,
  "github-actions.validation.severity": {
    "context-access": "ignore",      // or "hint" | "warning" | "error"
    "unknown-action": "warning",
    "deprecated-command": "hint",
    "schema": "error",
    "expression": "warning"
  }
}

Alternatively, a simpler approach:

{
  "github-actions.validation.suppressedRules": [
    "context-access",
    "deprecated-command"
  ]
}

Benefits

  • Users can tailor validation to their workflow patterns
  • Reduces noise from false positives without losing useful diagnostics
  • Aligns with patterns in other linting extensions (ESLint, Pylint, etc.)

Workaround (Current)

The only workaround is to change file associations:

"files.associations": {
  ".github/workflows/*.yml": "yaml"
}

This disables all GitHub Actions features, which is undesirable.

Environment

  • Extension version: 0.29.1
  • VS Code version: 1.96.x
  • OS: macOS
主要语言
TypeScript
星标
661
派生
214
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

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

github/vscode-github-actions 的其他 Issue

查看 github/vscode-github-actions 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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