chore: add package schema to vscode settings.json#656
Conversation
| "zarf.yaml" | ||
| ], | ||
| "https://raw.githubusercontent.com/defenseunicorns/uds-core/main/schemas/package-v1alpha1.schema.json": [ | ||
| "package.yaml" |
There was a problem hiding this comment.
super nit: would probably add uds-package.yaml here. I think that's a common filename, maybe even more common than package.yaml.
There was a problem hiding this comment.
Also will this actually work as you intend it to? First, the uds-package.yaml is relative to the chart/charts directory. Second, its in every case i have ever seen actually a helm template not a standard yaml file and i dont think that will work with the json schema and will just show a bunch of errors.
There was a problem hiding this comment.
That is a great question!
Yes. It will work as I intended for YAML files, and it is a no-op for Helm templated UDS Packages. See https://github.com/defenseunicorns/uds-core/blob/main/.vscode/settings.json#L25 for reference.
For .yaml files with {{ }} syntax, VSCode sets the language-id to be "helm-template" which is not an activation event for the redhat.vscode-yaml VSCode extension. Therefore, no checking is performed. The helm-ls vscode extension theoretically could enable this functionality, but it appears to have only a couple thousand downloads and does not appear to be functional at the moment.
Secondly, the **/ syntax is not necessary to find files nested in subdirectories. However, I have added it for improved readability and consistency with UDS Core.
Description
Checklist before merging