-
Notifications
You must be signed in to change notification settings - Fork 221
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
Inconsistent validation based on file extension (file.yml vs file.yaml) #288
Comments
Most likely the file name you are using is automatically associating with one of the schemas from http://schemastore.org/json/ based on:
because the only way this should show is if its comparing against a json schema. If you want to turn off this feature you can turn off |
Closing since this went silent |
@JPinkney @gorkem So is there any way to actually debug or fix this issue with the Schema Store? It's impossible to even figure out what it's pulling from the store, because the error messages don't explain or provide sources for themselves. This seems like it's a pretty big flaw in the Schema Store feature if it just silently picks a false positive for validation. It took me quite a while to trace it back to this extension and this particular issue, simply because |
The only way is to fix it is to modify the json schema in the json schema store repository https://github.com/SchemaStore/schemastore |
@JPinkney Which schema file…? This is the issue. Other linters like ESLint or Typescript will identify themselves in the Problems pane, and directly link to their validation source (ESLint with external doc links, or TS with error codes). |
Extending diagnostics is a good idea opened redhat-developer/yaml-language-server#310 |
Upon saving a yaml file as .yml previous valid yaml syntax reports invalid.
Operating System: Windows 10
VS Code Release: 1.43.1
YAML Extension Version: 0.7.2
Steps to reproduce:
At this point all previously valid syntax reports 'Incorrect type. Expected "string".'
All syntax now reports correct again.
Specifically the filename I tested with is "myAppConfig" and follows the exact same formatting as above. It is being saved in the default Windows 10 document folder and using "Spaces 2" indentation. Verified no trailing white space and that both files validate fine with a up to data Python3 yamllint install.
The text was updated successfully, but these errors were encountered: