pulumi / pulumi-yaml

YAML language provider for Pulumi
Apache License 2.0
39 stars 12 forks source link

Warnings and Errors should be prefixed with lowercase `warning` and `error` to match the CLI's output #467

Open justinvp opened 1 year ago

justinvp commented 1 year ago

I'm looking at adding a new error to YAML for invalid YAML programs and noticed that warnings from the CLI have a lowercase warning prefix, but warnings/errors from YAML have those prefixes in uppercase.

We should change these to be lowercase to match the CLI.

Diagnostics:
  pulumi:pulumi:Stack (yamloption-dev):
    warning: using pulumi-language-yaml from $PATH at /Users/justin/go/bin/pulumi-language-yaml
    warning: using pulumi-language-yaml from $PATH at /Users/justin/go/bin/pulumi-language-yaml

    Warning: Field 'version' does not exist on Object 'resources.my-bucket'
      on Pulumi.yaml line 10:
      10:     version: v5.41.0
    Existing fields are: 'options', 'get', 'type', 'properties', 'defaultProvider'
    Error: Required field 'type' is missing on resource "my-bucket"
      on Pulumi.yaml line 9:
       9:   my-bucket:

Resources:
    + 1 to create
Screen Shot 2023-07-28 at 5 20 36 PM