github / github/vscode-github-actions

Problems pane shows problems from git diffs

Aberta
#105 0 comentários 4 reações 0 responsáveis Ver no GitHub
bug
Linguagem predominante
TypeScript
Estrelas
660
Forks
213
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

**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`

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.