From af498864462e03e2716a56ce1f53f010a3654291 Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Fri, 11 Jul 2014 15:48:37 +0300 Subject: [PATCH] Vimlint: add g:syntastic_vimlint_options. --- plugin/syntastic.vim | 2 +- syntax_checkers/vim/vimlint.vim | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 176f50bd..0a0c6b2a 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.4.0-93' +let g:syntastic_version = '3.4.0-94' lockvar g:syntastic_version " Sanity checks {{{1 diff --git a/syntax_checkers/vim/vimlint.vim b/syntax_checkers/vim/vimlint.vim index 309e5878..7122de1f 100644 --- a/syntax_checkers/vim/vimlint.vim +++ b/syntax_checkers/vim/vimlint.vim @@ -53,7 +53,7 @@ function! SyntaxCheckers_vim_vimlint_GetLocList() dict " value 3: the message is a warning " " References: :help vimlint-errorcode and :help vimlint-variables - return vimlint#vimlint(expand('%'), { + let param = { \ 'output': function('s:vimlintOutput'), \ 'quiet': 1, \ 'EVL102': 3, @@ -63,7 +63,16 @@ function! SyntaxCheckers_vim_vimlint_GetLocList() dict \ 'EVL106': 3, \ 'EVL201': 3, \ 'EVL204': 3, - \ 'EVL205': 3 }) + \ 'EVL205': 3 } + + if exists('g:syntastic_vimlint_options') + if type(g:syntastic_vimlint_options) == type({}) + let options = filter(copy(g:syntastic_vimlint_options), 'v:key =~# "\\m^EVL"') + call extend(param, options, 'force') + endif + endif + + return vimlint#vimlint(expand('%'), param) endfunction " @vimlint(EVL103, 1, a:filename)