Version check for rubocop.
Only rubocop versions 0.9.0 or later are supported.
This commit is contained in:
parent
0f6dad6b4c
commit
3e46bcf71a
@ -19,7 +19,9 @@ endif
|
|||||||
let g:loaded_syntastic_ruby_rubocop_checker=1
|
let g:loaded_syntastic_ruby_rubocop_checker=1
|
||||||
|
|
||||||
function! SyntaxCheckers_ruby_rubocop_IsAvailable()
|
function! SyntaxCheckers_ruby_rubocop_IsAvailable()
|
||||||
return executable('rubocop')
|
return
|
||||||
|
\ executable('rubocop') &&
|
||||||
|
\ syntastic#util#versionIsAtLeast(syntastic#util#parseVersion('rubocop --version'), [0,9,0])
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_ruby_rubocop_GetLocList()
|
function! SyntaxCheckers_ruby_rubocop_GetLocList()
|
||||||
@ -29,7 +31,7 @@ function! SyntaxCheckers_ruby_rubocop_GetLocList()
|
|||||||
\ 'filetype': 'ruby',
|
\ 'filetype': 'ruby',
|
||||||
\ 'subchecker': 'rubocop' })
|
\ 'subchecker': 'rubocop' })
|
||||||
|
|
||||||
let errorformat = '%f:%l:%c:\ %t:\ %m'
|
let errorformat = '%f:%l:%c: %t: %m'
|
||||||
|
|
||||||
let loclist = SyntasticMake({
|
let loclist = SyntasticMake({
|
||||||
\ 'makeprg': makeprg,
|
\ 'makeprg': makeprg,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user