summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryasuhiroki <yasuhiroki.duck@gmail.com>2018-06-13 09:10:22 +0900
committeryasuhiroki <yasuhiroki.duck@gmail.com>2018-06-13 09:11:14 +0900
commiteabf5d55d69131c8a3f5ba50d3c15b36cde1f9e6 (patch)
treebab047b13f2cf21139a7480af008ed200df13ce8
parentae25d71fa846df0383232d31768ff934192fe313 (diff)
downloadale-eabf5d55d69131c8a3f5ba50d3c15b36cde1f9e6.zip
Add end_lnum and end_col in cfn_python_lint handler
-rw-r--r--ale_linters/cloudformation/cfn_python_lint.vim2
-rw-r--r--test/handler/test_cfn_python_lint_handler.vader4
2 files changed, 6 insertions, 0 deletions
diff --git a/ale_linters/cloudformation/cfn_python_lint.vim b/ale_linters/cloudformation/cfn_python_lint.vim
index a401f224..25e86ca3 100644
--- a/ale_linters/cloudformation/cfn_python_lint.vim
+++ b/ale_linters/cloudformation/cfn_python_lint.vim
@@ -15,6 +15,8 @@ function! ale_linters#cloudformation#cfn_python_lint#Handle(buffer, lines) abort
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],
\ 'code': l:code,
\ 'type': l:code[:0] is# 'E' ? 'E' : 'W',
diff --git a/test/handler/test_cfn_python_lint_handler.vader b/test/handler/test_cfn_python_lint_handler.vader
index 1bbd6388..a053e84e 100644
--- a/test/handler/test_cfn_python_lint_handler.vader
+++ b/test/handler/test_cfn_python_lint_handler.vader
@@ -11,6 +11,8 @@ Execute(The cfn_python_lint handler should parse items correctly):
\ {
\ 'lnum': 96,
\ 'col': 7,
+ \ 'end_lnum': 96,
+ \ 'end_col': 15,
\ 'text': 'Property Resources/Sample/Properties/FromPort should be of type Integer',
\ 'code': 'E3012',
\ 'type': 'E',
@@ -18,6 +20,8 @@ Execute(The cfn_python_lint handler should parse items correctly):
\ {
\ 'lnum': 97,
\ 'col': 7,
+ \ 'end_lnum': 97,
+ \ 'end_col': 15,
\ 'text': 'AllowedPattern and/or AllowedValues for Parameter should be specified at Parameters/SampleIpAddress. Example for AllowedPattern "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$"',
\ 'code': 'W2509',
\ 'type': 'W',