Skip to content

Improve reporting of extension config schema validation errors #120457

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

Merged
merged 1 commit into from
Apr 6, 2021

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