github / github/vscode-github-actions

Invalid syntax highlighting with or condition `||`

未關閉
#224 2 則留言 7 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
TypeScript
星號
660
分支
213
PR 合併指標
30 天內沒有已合併 PR

描述

**Describe the bug**
Syntax is invalid formatted with `||` at the begging of the line

**To Reproduce**
Steps to reproduce the behavior:
This workflow casuses invalid hightlighting on the last line:
```yaml
name: "CI / CD"

on: workflow_call

jobs:
prepare:
name: "Prepare"
runs-on: "ubuntu-22.04"
outputs:
perform-tests: "${{ steps.should-perform-tests.outputs.perform-tests }}"
perform-lint: "${{ steps.should-perform-lint.outputs.perform-lint }}"

steps:
- name: "Should perform tests"
id: "should-perform-tests"
run: |
echo "perform-tests=1" >> $GITHUB_OUTPUT

- name: "Should perform lint"
id: "should-perform-lint"
run: |
echo "perform-lint=1" >> $GITHUB_OUTPUT

ci:
name: "CI"
runs-on: "ubuntu-22.04"
needs: ["prepare"]
if: >
needs.prepare.outputs.perform-lint == 1
|| needs.prepare.outputs.perform-tests == 1
```

**Expected behavior**
The last line shouldn't be red and slanted.

**Screenshots**
![image](https://github.com/github/vscode-github-actions/assets/35669512/7ffd37b4-46ff-48f9-8d75-20d965ac55ee)

**Extension Version**
`v0.25.8`

貢獻指南

開啟貢獻指南

研究方向

No source files or tests are named. Reproduce the provided workflow in VS Code with the GitHub Actions extension, starting from the syntax-highlighting behavior around the multiline `if` expression; done means the line beginning with `||` is no longer shown red and slanted.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
github-actions, typescript, vscode
領域
developer-experience, tooling
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。