diff options
author | w0rp <devw0rp@gmail.com> | 2017-06-25 16:40:44 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-06-25 16:40:44 +0100 |
commit | 229a1c092a6f7d5116590bed2cf0e97ad63bbc7c (patch) | |
tree | 1c017369e01f9cc495a8fa041df6dcb41b3abfc8 /ale_linters/typescript | |
parent | 492260c967a2d5e955698584fbf1f075f44cda7c (diff) | |
download | ale-229a1c092a6f7d5116590bed2cf0e97ad63bbc7c.zip |
#684 Handle tslint errors without the severity included, and use character instead of position for the columns
Diffstat (limited to 'ale_linters/typescript')
-rw-r--r-- | ale_linters/typescript/tslint.vim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ale_linters/typescript/tslint.vim b/ale_linters/typescript/tslint.vim index 34499fe1..43ece555 100644 --- a/ale_linters/typescript/tslint.vim +++ b/ale_linters/typescript/tslint.vim @@ -17,12 +17,12 @@ function! ale_linters#typescript#tslint#Handle(buffer, lines) abort for l:error in json_decode(join(a:lines, '')) if ale#path#IsBufferPath(a:buffer, l:error.name) call add(l:output, { - \ 'type': (l:error.ruleSeverity ==# 'WARNING' ? 'W' : 'E'), + \ 'type': (get(l:error, 'ruleSeverity', '') ==# 'WARNING' ? 'W' : 'E'), \ 'text': l:error.failure, \ 'lnum': l:error.startPosition.line + 1, - \ 'col': l:error.startPosition.position + 1, + \ 'col': l:error.startPosition.character + 1, \ 'end_lnum': l:error.endPosition.line + 1, - \ 'end_col': l:error.endPosition.position + 1, + \ 'end_col': l:error.endPosition.character + 1, \}) endif endfor |