Skip to content

Improve reporting of extension config schema validation errors#120457

Merged
sandy081 merged 1 commit intomicrosoft:mainfrom
lf-:config-error-reporting
Apr 6, 2021
Merged

Improve reporting of extension config schema validation errors#120457
sandy081 merged 1 commit intomicrosoft:mainfrom
lf-:config-error-reporting

Conversation

@lf-
Copy link
Contributor

@lf- lf- commented Apr 3, 2021

In large extension configuration schemas, if a type error is present on a configuration key, an error message like the following is generated:
image

This requires the extension developer to go through each property and check it's the right type. I made it print out which one was bad:

image

This PR can be tested by updating the top level object of an extension package.json with this fragment:

{
    "contributes": {
        "configuration": {
            "type": "object",
            "title": "Rust Analyzer",
            "properties": {
                "rust-analyzer.thisPropShouldBeAnObjectButIsnt": false
           }
     }
}

@lf-
Copy link
Contributor Author

lf- commented Apr 3, 2021

(I think this is a preexisting broken build fwiw)

@sandy081 sandy081 added this to the April 2021 milestone Apr 6, 2021
@sandy081 sandy081 merged commit 6d9ca4a into microsoft:main Apr 6, 2021
@github-actions github-actions bot locked and limited conversation to collaborators May 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants