vscode-github-actions icon indicating copy to clipboard operation
vscode-github-actions copied to clipboard

Problems pane shows problems from git diffs

Open thedatasnok opened this issue 2 years ago • 0 comments

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)
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 }}
  1. Initialize a git repo and commit the file
  2. Make changes to the workflow file
  3. View the diff by clicking the file from the Source Control tab in VSCode
  4. Check the problems tab
  5. Close the diff tab
  6. Check the problems tab again
  7. 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

The read-only file opened when clicking the problem: image

Extension Version v0.25.4

thedatasnok avatar Apr 08 '23 19:04 thedatasnok