-
Notifications
You must be signed in to change notification settings - Fork 264
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
[Regression] Cloudformation Support #77
Comments
What are the errors? |
|
It also triggers follow on errors like |
It looks like instead of checking if the !FindInMap contains either scalar or sequence its looking like it is instead throwing an error when one one is found but not the other. |
The sample above is from the AWS codepipeline tutorial here https://s3.amazonaws.com/cloudformation-examples/user-guide/continuous-deployment/wordpress-single-instance.zip Hope that helps! |
Any luck with fixing?
despite having
|
I have similar error for !Join: unacceptable node kind for !<!Join> tag; it should be "scalar", not "sequence" |
I had this issue too. Custom tags setup in user.settings, etc. Removed cloudformation plugin Added in cloudformation plugin Problem now (temporarily I assume!) resolved. |
Still not working for me. This is the contents of my settings.json: Still get the error, unknown tag <!Equals> Anyone have any luck resolving yet? |
This works for me, but if you are using scalar types with those you will have issues
|
I resolved a similar issue by renaming my template to end with |
Is there a fix in the works for this? Have to disable validation make the editor usable: |
Not currently. Would you like to contribute one? I can show you where to get started. |
I'm not familiar with vscode extensions but I can take a look... |
I believe the problem stems from: https://github.com/redhat-developer/yaml-language-server/blob/master/src/languageservice/parser/yamlParser.ts#L256 where we use the custom tags and put them into the yaml-ast-parser. |
It appears that after added "!If sequence" to the list of custom tags, I need to restart my editor and it will work. |
I ended up using this one so far...
|
none of the customTags options work when you mix and max sequence and scalar. it only uses the first one and doesn't allow for the alternative option. so far the only way to go is |
Replacing |
Hi everyone! Its been a long time coming but I've finally got custom tags working when you have a tag with multiple different types. That means in the next version you're able to do:
and the document will report no errors if you have something like:
|
@JPinkney That's pretty cool! If I just have "yaml.customTags": [
"!myTag1"
] I think it would make sense that scalar, mapping and sequence should all be accepted for |
This is the full set of required configurations (worked for me): {
"window.zoomLevel": 0,
"workbench.colorTheme": "Material Theme Darker",
"yaml.customTags": [
"!And scalar",
"!And mapping",
"!And sequence",
"!If scalar",
"!If mapping",
"!If sequence",
"!Not scalar",
"!Not mapping",
"!Not sequence",
"!Equals scalar",
"!Equals mapping",
"!Equals sequence",
"!Or scalar",
"!Or mapping",
"!Or sequence",
"!FindInMap scalar",
"!FindInMap mappping",
"!FindInMap sequence",
"!Base64 scalar",
"!Base64 mapping",
"!Base64 sequence",
"!Cidr scalar",
"!Cidr mapping",
"!Cidr sequence",
"!Ref scalar",
"!Ref mapping",
"!Ref sequence",
"!Sub scalar",
"!Sub mapping",
"!Sub sequence",
"!GetAtt scalar",
"!GetAtt mapping",
"!GetAtt sequence",
"!GetAZs scalar",
"!GetAZs mapping",
"!GetAZs sequence",
"!ImportValue scalar",
"!ImportValue mapping",
"!ImportValue sequence",
"!Select scalar",
"!Select mapping",
"!Select sequence",
"!Split scalar",
"!Split mapping",
"!Split sequence",
"!Join scalar",
"!Join mapping",
"!Join sequence"
],
"yaml.format.enable": true,
} |
The CloudFormation extension has added support to do this configuration automatically. aws-cloudformation/cfn-lint-visual-studio-code#65 |
Originally closed issue in #20 but it looks like Cloudformation support is no longer present.
This is with the following tags:
The text was updated successfully, but these errors were encountered: