diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-06-20 22:51:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-20 22:51:55 +0100 |
commit | 90dfe8e2a4ba06673cfe83a958ff20a449b8c128 (patch) | |
tree | e696c6684e48ecc2aa9832e7b56c830cc021da73 /ale_linters | |
parent | 11f303f8532863fb03e21e1b6f77b9ebcf7b0704 (diff) | |
parent | f14e3bb109f19e432c455314849880d08d9d5729 (diff) | |
download | ale-90dfe8e2a4ba06673cfe83a958ff20a449b8c128.zip |
Merge pull request #1665 from ashemedai/master
Make CloudFormation linter work again with latest version
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/cloudformation/cfn_python_lint.vim | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ale_linters/cloudformation/cfn_python_lint.vim b/ale_linters/cloudformation/cfn_python_lint.vim index 25e86ca3..d0ac7b28 100644 --- a/ale_linters/cloudformation/cfn_python_lint.vim +++ b/ale_linters/cloudformation/cfn_python_lint.vim @@ -4,8 +4,8 @@ function! ale_linters#cloudformation#cfn_python_lint#Handle(buffer, lines) abort " Matches patterns line the following: " - " sample.template.yaml:96:7:96:15: [E3012] Property Resources/Sample/Properties/FromPort should be of type Integer - let l:pattern = '\v^(.*):(\d+):(\d+):(\d+):(\d+): \[([[:alnum:]]+)\] (.*)$' + " sample.template.yaml:96:7:96:15:E3012:Property Resources/Sample/Properties/FromPort should be of type Integer + let l:pattern = '\v^(.*):(\d+):(\d+):(\d+):(\d+):([[:alnum:]]+):(.*)$' let l:output = [] for l:match in ale#util#GetMatches(a:lines, l:pattern) @@ -13,13 +13,13 @@ function! ale_linters#cloudformation#cfn_python_lint#Handle(buffer, lines) abort if ale#path#IsBufferPath(a:buffer, l:match[1]) call add(l:output, { - \ 'lnum': l:match[2] + 0, - \ 'col': l:match[3] + 0, - \ 'end_lnum': l:match[4] + 0, - \ 'end_col': l:match[5] + 0, - \ 'text': l:match[7], + \ 'lnum': l:match[2], + \ 'col': l:match[3], + \ 'end_lnum': l:match[4], + \ 'end_col': l:match[5], \ 'code': l:code, \ 'type': l:code[:0] is# 'E' ? 'E' : 'W', + \ 'text': l:match[7] \}) endif endfor |