Skip to content
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

support for custom tags #1

Open
tvald opened this issue Jun 22, 2017 · 1 comment
Open

support for custom tags #1

tvald opened this issue Jun 22, 2017 · 1 comment

Comments

@tvald
Copy link

tvald commented Jun 22, 2017

The underlying parser (yaml-ast-parser) treats unrecognized custom tags as errors. (relevant code)

Currently, there is no way to pass custom tags into yaml-ast-parser, since it's being used to generate a generic AST for later validation by VSCode's language tooling. (relevant code)

It may be more appropriate to modify yaml-ast-parser to accept a flag which disables custom tag type validation (you seem to be a contributor there as well), or perhaps this plugin can call the parser with options (such as typeMap) taken from the VSCode settings entry for the active schema.

@adamvoss
Copy link
Owner

Thanks for investigating this @tvald! I have no special relationship to yaml-ast-parser but I have had good success with that project accepting pull requests.

You probably have a better idea than I regarding which would be more desired/convenient/practical: the global opt-out or opt-in of each custom tag. Which would you want?

Either change you mentioned doesn't sound too complicated. Is this something you would be interested in working on?

The only outstanding complication I can think of would be deciding how these custom tag nodes should be represented in the VSCode AST (which also directs how JSON Schema validation would behave around them).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants