From 0bfac45565efa4e94364818b3b0cb2ee46826a0f Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Tue, 18 Apr 2017 11:00:02 +0300 Subject: [PATCH] Checker tslint: error format has changed. --- autoload/syntastic/preprocess.vim | 2 +- plugin/syntastic.vim | 2 +- syntax_checkers/typescript/tslint.vim | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/autoload/syntastic/preprocess.vim b/autoload/syntastic/preprocess.vim index 451d308c..aacb4fd3 100644 --- a/autoload/syntastic/preprocess.vim +++ b/autoload/syntastic/preprocess.vim @@ -435,7 +435,7 @@ echomsg string(out) endfunction " }}}2 function! syntastic#preprocess#tslint(errors) abort " {{{2 - return map(copy(a:errors), 'substitute(v:val, ''\m^\(([^)]\+)\)\s\(.\+\)$'', ''\2 \1'', "")') + return map(copy(a:errors), 'substitute(v:val, ''\v^((ERROR|WARNING): )?\zs(\([^)]+\))\s(.+)$'', ''\4 \3'', "")') endfunction " }}}2 function! syntastic#preprocess#validator(errors) abort " {{{2 diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index db09b4af..2dbd339a 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.8.0-39' +let g:_SYNTASTIC_VERSION = '3.8.0-40' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/syntax_checkers/typescript/tslint.vim b/syntax_checkers/typescript/tslint.vim index de224b6b..c8f9ab89 100644 --- a/syntax_checkers/typescript/tslint.vim +++ b/syntax_checkers/typescript/tslint.vim @@ -30,8 +30,10 @@ function! SyntaxCheckers_typescript_tslint_GetLocList() dict \ 'args_after': '--format verbose', \ 'fname_before': (s:tslint_new ? '' : '-f') }) - " (comment-format) ts/app.ts[12, 36]: comment must start with lowercase letter - let errorformat = '%f[%l\, %c]: %m' + let errorformat = + \ '%EERROR: %f[%l\, %c]: %m,' . + \ '%WWARNING: %f[%l\, %c]: %m,' . + \ '%E%f[%l\, %c]: %m' return SyntasticMake({ \ 'makeprg': makeprg,