github / github/vscode-github-actions

Problems pane shows problems from git diffs

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

描述

**Describe the bug**
Whenever I open up a workflow with the git diff editor, it evaluates both the file prior to the made changes and the current version.
The problems are not keyed by file name, resulting in multiple groups of problems in the problem pane.

The main problem I have is that they don't disappear even after closing the diff editor.

I have attached a screenshot of how it behaves.

**To Reproduce**
Steps to reproduce the behavior:
1. Set up a file with the name `cd.yaml` with the following contents in the `.github/workflows` folder of a project. (the important part is just being able to produce a problem within a workflow file, I'll attach a segments of mine as an example)

```yaml
name: Deployment

on:
push:
tags:
- '*'

jobs:
deploy-images:
runs-on: ubuntu-latest
steps:
- run: echo 'hello'

deploy-staging:
runs-on: ubuntu-latest
environment: Staging
needs: deploy-images
steps:
- name: Git Checkout
uses: actions/checkout@v3

- name: Set up kubectl
uses: azure/setup-kubectl@v3

- name: Set k8s context
uses: azure/k8s-set-context@v3
with:
method: service-account
k8s-url: ${{ env.K8S_API_URL }}
k8s-secret: ${{ secrets.K8S_SECRET }}
```

2. Initialize a git repo and commit the file
3. Make changes to the workflow file
4. View the diff by clicking the file from the `Source Control` tab in VSCode
5. Check the problems tab
6. Close the diff tab
7. Check the problems tab again
8. Click a problem, and a read-only file will open

**Expected behavior**
I don't typically see linting tools behave in this manner, the other ones I use such as SonarLint only show problems for the current state of the file.

**Screenshots**

The problems tab after opening diff editors:
![image](https://user-images.githubusercontent.com/47036430/230738136-9b2afe79-5a89-44fb-905b-007b360c4f6e.png)

The read-only file opened when clicking the problem:
![image](https://user-images.githubusercontent.com/47036430/230738564-06376767-0aa4-45d4-bc76-eadf15581947.png)

**Extension Version**
`v0.25.4`

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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