Pylint versioning strikes again.

This commit is contained in:
LCD 47 2014-02-17 11:49:02 +02:00
parent bc9620eed9
commit ffe3085a80

View File

@ -62,8 +62,10 @@ function! s:PylintNew(exe)
let exe = syntastic#util#shescape(a:exe)
try
" On Windows the version is shown as "pylint-script.py 1.0.0".
" On Gentoo Linux it's "pylint-python2.7 0.28.0". Oh, joy. :)
let pylint_version = filter(split(system(exe . ' --version'), '\m, \=\|\n'), 'v:val =~# ''\m^pylint\>''')[0]
" On Gentoo Linux it's "pylint-python2.7 0.28.0".
" On NixOS, that would be ".pylint-wrapped 0.26.0", that would be.
" Have you guys considered switching to creative writing yet? ;)
let pylint_version = filter(split(system(exe . ' --version'), '\m, \=\|\n'), 'v:val =~# ''\m^\.\=pylint\>''')[0]
let pylint_version = substitute(pylint_version, '\v^\S+\s+', '', '')
let ret = syntastic#util#versionIsAtLeast(syntastic#util#parseVersion(pylint_version), [1])
catch /^Vim\%((\a\+)\)\=:E684/