mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Use schema allOf property to get independent error reporting
fixes #21113
This commit is contained in:
parent
7239bb2c33
commit
973bac0c4f
|
@ -226,8 +226,14 @@ export class Adapter {
|
|||
properties: osProperties
|
||||
};
|
||||
Object.keys(attributes.properties).forEach(name => {
|
||||
attributes.properties[name].errorMessage = attributes.properties[name].errorMessage || nls.localize('deprecatedVariables', "'env.', 'config.' and 'command.' are deprecated, use 'env:', 'config:' and 'command:' instead.");
|
||||
attributes.properties[name].pattern = attributes.properties[name].pattern || '^(?!\\$\\{(env|config|command)\\.)';
|
||||
// Use schema allOf property to get independent error reporting #21113
|
||||
const allOf = [attributes.properties[name], {
|
||||
errorMessage: nls.localize('deprecatedVariables', "'env.', 'config.' and 'command.' are deprecated, use 'env:', 'config:' and 'command:' instead."),
|
||||
pattern: '^(?!\\$\\{(env|config|command)\\.)'
|
||||
}];
|
||||
attributes.properties[name] = {
|
||||
allOf
|
||||
};
|
||||
});
|
||||
|
||||
return attributes;
|
||||
|
|
Loading…
Reference in a new issue