stoplightio / vscode-spectral

VS Code extension bringing the awesome Spectral JSON/YAML linter with OpenAPI/AsyncAPI support

Home Page:https://marketplace.visualstudio.com/items?itemName=stoplight.spectral

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intermittent Lint Error on Locally Referenced Files

Guido125 opened this issue · comments

Describe the bug
I'm not getting Spectral Lint issues on locally referenced files when editing those local files. They seem to only occur when editing the root file, but disappear when editing other files.

To Reproduce

  1. Have an OpenAPI yaml doc that contains:
paths:
  "/register":
    $ref: "authentication/paths/register.yaml"
  1. Ensure that the file authentication/paths/register.yaml has a Lint issue in it.
  2. Edit the root OpenAPI yaml doc in any way.
  3. Undo the above edit.
  4. Go to authentication/paths/register.yaml.
  5. Notice the Lint issue is shown.
  6. Edit authentication/paths/register.yaml in any way.
  7. Undo the above edit.
  8. Notice the Lint issue is no longer shown.

Expected behavior
Lint issues shown on locally referenced files at all times.

Environment:
Only Extension:
Spectral: 0.2.4

VSCode About:

Version: 1.50.0
Commit: 93c2f0fbf16c5a4b10e4d5f89737d9c2c25488a3
Date: 2020-10-07T06:01:33.073Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Linux x64 5.4.0-48-generic