Extension does not clean up Problems view after correcting an error
DavidBiesack opened this issue · comments
Describe the bug
Spectral finds a problem; in this case, a $ref cannot be resolved. The extension properly shows valid problems
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.
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:
- Extension version: v1.1.0
- VS Code version: 1.71.2
- Operating System: MacOS
stale-problems-view.zip