question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to work with .template

See original GitHub issue

I have several *.template file, and all file begin with AWSTemplateFormatVersion: '2010-09-09' at first line, but I cannot get any lint on the file.

When I click other *.yml file, it will output Don't believe this is a CloudFormation template., it correct, because it really not a cloudformation template, but when I click the cloudformation template *.template file, it doesn’t have any output messages.

Anyone could help? Should I modify any config?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kddejongcommented, Nov 8, 2018

The quick fix on an individual file is to switch the language of the file.
https://code.visualstudio.com/docs/languages/overview#_changing-the-language-for-the-selected-file

You can more permanently make that change by following this. https://code.visualstudio.com/docs/languages/overview#_can-i-map-additional-file-extensions-to-a-language

@cmmeyer Not sure how far down this we should go. There is absolutely a contingent of *.template folks. I’m not sure we could more globally enable *.template as a CloudFormation template that we would then lint. I may have to see if there are some easier options for this. These workarounds above should provide a solution until we can discuss this more.

1reaction
kddejongcommented, Nov 28, 2018

@rjlohan possibly. We could change this to *. https://github.com/awslabs/aws-cfn-lint-visual-studio-code/blob/master/package.json#L19-L22

https://github.com/awslabs/aws-cfn-lint-visual-studio-code/blob/master/client/src/extension.ts#L39-L42

I think the problem is the .template doesn’t associate with a language (unless someone installed a language plugin). We could add the ability to associate to an extension but I would have to look into this… I’m just not sure off the top of my head. The good thing is cfn-lint doesn’t care about json or yaml.

We could better document this fix as well.

"files.associations": {
    "*.template": "yaml"
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with Templates - Jarte
A template is a special document meant to be used as a starting point for creating new documents. For example, a business letter...
Read more >
Using Templates to automate work and increase your ...
Templates are a great way to boost productivity and reduce the time it takes to complete repeat tasks. They have benefits for both...
Read more >
Start with a template - Microsoft Support
Try it! Select File > New. Choose a template or type a key word or phrase into the Search for online templates and...
Read more >
How to work with me template - Short Takes & Stakes -
The template I use was evolved by someone else while she was leading teams. I've adopted it and started making my own tweaks....
Read more >
Word 2010: Using a Template - GCFGlobal
A template is a predesigned document you can use to create documents quickly without having to think about formatting. With a template, many...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found