diff options
author | Mohamed hamza <m.hamza20@icloud.com> | 2020-05-15 03:40:46 +0200 |
---|---|---|
committer | Mohamed hamza <m.hamza20@icloud.com> | 2020-05-15 03:40:46 +0200 |
commit | 6b8f08f7fcb3b2bc9da87de1ebafd90799ab1573 (patch) | |
tree | e7b8a6631ff29f7deddddee112e16fb07ba32856 | |
parent | 345daf683b9792dc7b131181585eb0a37a02e853 (diff) | |
download | ale-6b8f08f7fcb3b2bc9da87de1ebafd90799ab1573.zip |
Added linter installing methods
-rw-r--r-- | doc/ale-cloudformation.txt | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/doc/ale-cloudformation.txt b/doc/ale-cloudformation.txt index 81cb9dd9..9724403b 100644 --- a/doc/ale-cloudformation.txt +++ b/doc/ale-cloudformation.txt @@ -7,23 +7,40 @@ cfn-python-lint *ale-cloudformation-cfn-python-lint* cfn-python-lint is a linter for AWS CloudFormation template file. -https://github.com/awslabs/cfn-python-lint -=============================================================================== -Getting it to work: *ale-cloudformation-activate* +Website: https://github.com/awslabs/cfn-python-lint -To get cloudformation linter to work on only CloudFormation files put +Installation +------------------------------------------------------------------------------- - au BufRead,BufNewFile *.template.yaml set filetype=yaml.cloudformation -on `ftdetect/cloudformation.vim` +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 +------------------------------------------------------------------------------- -and +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. -let b:ale_linter_aliases = {'cloudformation': ['cloudformation', 'yaml']} +Just put: -on `after/ftplugin/yaml.vim` +> -This will get both cloudformation and yaml linters on work on any file with `template.yaml` ext. + 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. =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: - |