From 2fbd870a20062f8849a4f530446787d21394c40f Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Tue, 8 Oct 2013 18:24:14 +0300 Subject: [PATCH] Deal with more pylint versioning creativity. --- syntax_checkers/python/pylint.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/syntax_checkers/python/pylint.vim b/syntax_checkers/python/pylint.vim index 7b2f3628..016f8e01 100644 --- a/syntax_checkers/python/pylint.vim +++ b/syntax_checkers/python/pylint.vim @@ -51,8 +51,10 @@ endfunction function s:PylintNew() try - " On Windows the version is shown as "pylint-script.py 1.0.0" - let pylint_version = filter(split(system('pylint --version'), '\m, \=\|\n'), 'v:val =~# ''\m^pylint\(-script\.py\)\= ''')[0] + " 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('pylint --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/ call syntastic#util#error("checker python/pylint: can't parse version string (abnormal termination?)")