microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.69k stars 4.52k forks source link

[New Feature]: Validate that manifest files include schema header #83697

Open Trenly opened 2 years ago

Trenly commented 2 years ago

Description of the new feature/enhancement

The current tooling for creating manifests adds the yaml schema header to manifest files; Because contributors may frequently load the files in editors which support the schema headers, it is beneficial for files to contain the headers. This feature would - 1) Validate that all schema files have a # yaml-language-server: $schema= header

It would be great (but less important) if it could also

1) Validate that the manifest type matches the schema header 2) Validate that the manifest version matches the schema header

Proposed technical implementation details (optional)

Pipeline validation with a status label like Manifest-Schema-Error