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

Add Missing Custom YAML Tags #69

Closed
sgtoj opened this issue Oct 31, 2019 · 7 comments
Closed

Add Missing Custom YAML Tags #69

sgtoj opened this issue Oct 31, 2019 · 7 comments

Comments

@sgtoj
Copy link

sgtoj commented Oct 31, 2019

The previous issue -- #66 -- was caused missing custom tags. The following value for yaml.customTag setting allows for yaml.validate to be enable for CloudFormation template. I will update this issue if I find others.

  "yaml.customTags": [
    "!fn",
    "!And",
    "!And sequence",
    "!If",
    "!If sequence",
    "!Not",
    "!Not sequence",
    "!Equals",
    "!Equals sequence",
    "!Or",
    "!Or sequence",
    "!FindInMap",
    "!FindInMap sequence",
    "!Base64",
    "!Join",
    "!Join sequence",
    "!Cidr",
    "!Ref",
    "!Sub",
    "!Sub sequence",
    "!GetAtt",
    "!GetAZs",
    "!ImportValue",
    "!ImportValue sequence",
    "!Select",
    "!Select sequence",
    "!Split",
    "!Split sequence"
  ],
@kddejong
Copy link
Contributor

thanks @sgtoj .

@kddejong
Copy link
Contributor

Where does !fn come from?

@sgtoj
Copy link
Author

sgtoj commented Oct 31, 2019

Left that one by mistake. It can remove it.

@kddejong
Copy link
Contributor

kddejong commented Nov 1, 2019

Updated this in v0.10.2 which will be out very shortly.

@kddejong kddejong closed this as completed Nov 1, 2019
@kddejong
Copy link
Contributor

kddejong commented Nov 1, 2019

@sgtoj I used your list instead of what is here redhat-developer/yaml-language-server#77. Your list seems complete and more valid.

@tracphil
Copy link

Unless I am missing anything, this has not been resolved unless I am missing something in my settings.

My settings.json relevant parts:

    "cfnLint.validateUsingJsonSchema": false,
    "yaml.customTags": [
        "!And",
        "!And sequence",
        "!If",
        "!If sequence",
        "!Not",
        "!Not sequence",
        "!Equals",
        "!Equals sequence",
        "!Or",
        "!Or sequence",
        "!FindInMap",
        "!FindInMap sequence",
        "!Base64",
        "!Join",
        "!Join sequence",
        "!Cidr",
        "!Ref",
        "!Sub",
        "!Sub sequence",
        "!GetAtt",
        "!GetAZs",
        "!ImportValue",
        "!ImportValue sequence",
        "!Select",
        "!Select sequence",
        "!Split",
        "!Split sequence"
    ],
    "yaml.format.enable": false,
    "yaml.validate": false

With those settings, I am still getting (lots of others, this is an example):

unknown tag: <!Sub>

I am not sure whether others are seeing this or if I should open a new issue, so I thought I would mention it here first.

@tracphil
Copy link

Updating for the fix that help me. I removed the Ansible extension and this extension started working as expected.

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

3 participants