Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension does not clean up Problems view after correcting an error #171

Open
DavidBiesack opened this issue Sep 30, 2022 · 0 comments
Open

Comments

@DavidBiesack
Copy link

Describe the bug

Spectral finds a problem; in this case, a $ref cannot be resolved. The extension properly shows valid problems

Screen Shot 2022-09-30 at 9 25 54 AM

However, after I correct the paths for those $ref, Spectral does not remove the errors. It leave error items and text markers in the source.

Screen Shot 2022-09-30 at 9 31 52 AM

Even closing the file and opening it again does not clear the problems view. I have to exit VS Code and restart.

Similarly, when Spectral adds a problem about an unused component, that problem persists
even after adding a .spectral.yaml file containing

extends: spectral:oas
rules:
  oas3-unused-component: false

To Reproduce

unzip the attachment
Even though the command

$ cd apis/common
$ spectral lint -r .spectral.yaml openapi.yaml 
No results with a severity of 'error' found!

the VS Code view still shows the problems.

For this small example, the problem view does clear when I fix the $ref from

        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'

to

        '401':
          $ref: '../common/openapi.yaml#/components/responses/401'
        '403':
          $ref: '../common/openapi.yaml#/components/responses/403'

but in my working OpenAPI (3000+ lines) it does not refresh

Expected behavior

Clear errors for a file after the file has been edited and re-scanned.

Environment:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant