Vscode: [Settings GUI] String array: No help in filling enum values

Created on 16 Jul 2019  路  6Comments  路  Source: microsoft/vscode

77427

"type": "array",
"items": {
    "type": "string",
    "enum": [
        "error",
        "warning",
        "info",
        "hint"
    ]
},

settings.json:

Screenshot (29)

settings GUI:

Screenshot (30)

feature-request settings-editor

Most helpful comment

Validation is still necessary because you can type whatever you want or the validation criteria can change.

All 6 comments

I think this is FAR worse than just not providing help when using enums, because as far as I can tell it doesn't even validate values against the allowed enum values. Which is basically inviting users to enter invalid/bad data which can cause extensions to not function properly.

While this was always possible before, the user would not only get intellisense on the allowed values you'd also get error warning about invalid values.

Can this be something that is prioritized for at least the next iteration (though IMO this should warrant a patch release when fixed)?

/cc @roblourens @kieferrm

Validation issue was closed as-designed: #77456

@octref and I talked about this, I thought there was an open issue for validation somewhere.

Additional validation wouldn't be as necessary if it just worked like standalone enums do with a drop-down instead of a text input.

Validation is still necessary because you can type whatever you want or the validation criteria can change.

Errors are added as part of #77459 (besides enum, pattern, minItems, maxItems are also supported).

image

So I'm putting this one into backlog.

Was this page helpful?
0 / 5 - 0 ratings