From 748725c77513c2762a4e10ab53cb7bb92774946a Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Tue, 4 Aug 2015 23:43:28 +0300 Subject: [PATCH] Tslint checker: version 2.4.0 and later no longer support "-f". --- plugin/syntastic.vim | 2 +- syntax_checkers/typescript/tslint.vim | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 9ce99716..4d827ef4 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.6.0-142' +let g:_SYNTASTIC_VERSION = '3.6.0-143' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/syntax_checkers/typescript/tslint.vim b/syntax_checkers/typescript/tslint.vim index 9a927854..de224b6b 100644 --- a/syntax_checkers/typescript/tslint.vim +++ b/syntax_checkers/typescript/tslint.vim @@ -22,9 +22,13 @@ function! SyntaxCheckers_typescript_tslint_GetHighlightRegex(item) endfunction function! SyntaxCheckers_typescript_tslint_GetLocList() dict + if !exists('s:tslint_new') + let s:tslint_new = syntastic#util#versionIsAtLeast(self.getVersion(), [2, 4]) + endif + let makeprg = self.makeprgBuild({ \ 'args_after': '--format verbose', - \ 'fname_before': '-f' }) + \ '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'