Vscode-yaml: "Unknown tag" error when validating sets

Created on 2 Jul 2019  路  3Comments  路  Source: redhat-developer/vscode-yaml

This works just fine as YAML:

1:
  not_allowed_match_user_ids: !!set {}
2:
  not_allowed_match_user_ids: !!set {}

However, this extension redlines it and gives the following errors:

unknown tag <tag:yaml.org,2002:set>
unknown tag <tag:yaml.org,2002:set>

According to https://github.com/adamvoss/vscode-yaml/issues/16, it's possible to add these tags to your own settings, but I can't find the right name to add them with.

bug

Most helpful comment

any updates?

key: !!bool true

will cause similar error.

unknown tag <tag:yaml.org,2002:bool>

All 3 comments

I can add this to settings.json to resolve the error:

    "yaml.customTags": [
        "tag:yaml.org,2002:set"
    ]

However, then I get the following errors:

bad indentation of a mapping entry
unacceptable node kind for !<tag:yaml.org,2002:set> tag; it should be "scalar", not "mapping"
end of the stream or a document separator is expected

Is there anything I can add to settings.json to fix this?

Alternatively, is it possible to make this plugin ignore certain (custom) types altogether?

any updates?

key: !!bool true

will cause similar error.

unknown tag <tag:yaml.org,2002:bool>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

miqm picture miqm  路  4Comments

opsarno picture opsarno  路  5Comments

ssbarnea picture ssbarnea  路  3Comments

remcohaszing picture remcohaszing  路  4Comments

Deilan picture Deilan  路  6Comments