2018-06-04 16:23:25 +00:00
|
|
|
===============================================================================
|
|
|
|
ALE CloudFormation Integration *ale-cloudformation-options*
|
|
|
|
|
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
cfn-python-lint *ale-cloudformation-cfn-python-lint*
|
|
|
|
|
|
|
|
cfn-python-lint is a linter for AWS CloudFormation template file.
|
|
|
|
|
2020-05-15 01:40:46 +00:00
|
|
|
Website: https://github.com/awslabs/cfn-python-lint
|
2020-05-14 22:35:15 +00:00
|
|
|
|
2020-05-15 01:40:46 +00:00
|
|
|
Installation
|
|
|
|
-------------------------------------------------------------------------------
|
2020-05-14 22:35:15 +00:00
|
|
|
|
|
|
|
|
2020-05-15 01:40:46 +00:00
|
|
|
Install cfn-python-lint using either pip or brew: >
|
|
|
|
|
|
|
|
`pip install cfn-lint`. If pip is not available, run
|
|
|
|
`python setup.py clean --all` then `python setup.py install`.
|
|
|
|
|
|
|
|
Homebrew (macOS):
|
|
|
|
|
|
|
|
`brew install cfn-lint`
|
|
|
|
|
|
|
|
<
|
|
|
|
Configuration
|
|
|
|
-------------------------------------------------------------------------------
|
2020-05-14 22:35:15 +00:00
|
|
|
|
2020-05-15 01:40:46 +00:00
|
|
|
To get cloudformation linter to work on only CloudFormation files we must set
|
|
|
|
the buffer |filetype| to yaml.cloudformation.
|
|
|
|
This causes ALE to lint the file with linters configured for cloudformation and
|
|
|
|
yaml files.
|
2020-05-14 22:35:15 +00:00
|
|
|
|
2020-05-15 01:40:46 +00:00
|
|
|
Just put:
|
2020-05-14 22:35:15 +00:00
|
|
|
|
2020-05-15 01:40:46 +00:00
|
|
|
>
|
2018-06-04 16:23:25 +00:00
|
|
|
|
2020-05-15 01:40:46 +00:00
|
|
|
au BufRead,BufNewFile *.template.yaml set filetype=yaml.cloudformation
|
|
|
|
|
|
|
|
<
|
|
|
|
|
|
|
|
on `ftdetect/cloudformation.vim`
|
|
|
|
|
|
|
|
This will get both cloudformation and yaml linters to work on any file with `.template.yaml` ext.
|
2018-06-04 16:23:25 +00:00
|
|
|
===============================================================================
|
|
|
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|