diff options
author | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:11:56 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:11:56 +0200 |
commit | 9931e0888b2419326ae10ebbfae532261c5c125f (patch) | |
tree | 7504be5daccbb7b7d1ea396754de47b11ed790e5 /vim/bundle/syntastic/syntax_checkers/python/pylint.vim | |
parent | e573b3020c032400eed60b649a2cbf55266e6bb0 (diff) | |
download | myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.tar.gz myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.tar.bz2 myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.zip |
Fix submodules
Diffstat (limited to 'vim/bundle/syntastic/syntax_checkers/python/pylint.vim')
m--------- | vim/bundle/syntastic | 0 | ||||
-rw-r--r-- | vim/bundle/syntastic/syntax_checkers/python/pylint.vim | 98 |
2 files changed, 0 insertions, 98 deletions
diff --git a/vim/bundle/syntastic b/vim/bundle/syntastic new file mode 160000 +Subproject cee74e0c1af934065fd1b3046e53cda76574f70 diff --git a/vim/bundle/syntastic/syntax_checkers/python/pylint.vim b/vim/bundle/syntastic/syntax_checkers/python/pylint.vim deleted file mode 100644 index 884d07a..0000000 --- a/vim/bundle/syntastic/syntax_checkers/python/pylint.vim +++ /dev/null @@ -1,98 +0,0 @@ -"============================================================================ -"File: pylint.vim -"Description: Syntax checking plugin for syntastic.vim -"Maintainer: Parantapa Bhattacharya <parantapa at gmail dot com> -" -"============================================================================ - -if exists('g:loaded_syntastic_python_pylint_checker') - finish -endif -let g:loaded_syntastic_python_pylint_checker = 1 - -if !exists('g:syntastic_python_pylint_sort') - let g:syntastic_python_pylint_sort = 1 -endif - -let s:save_cpo = &cpo -set cpo&vim - -let s:pylint_new = -1 - -function! SyntaxCheckers_python_pylint_IsAvailable() dict " {{{1 - if !executable(self.getExec()) - return 0 - endif - - 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". - " On NixOS, that would be ".pylint-wrapped 0.26.0". - " On Arch Linux it's "pylint2 1.1.0". - " On new-ish Fedora it's "python3-pylint 1.2.0". - " Have you guys considered switching to creative writing yet? ;) - - let version_output = syntastic#util#system(self.getExecEscaped() . ' --version') - let pylint_version = filter( split(version_output, '\m, \=\|\n'), 'v:val =~# ''\m^\(python[-0-9]*-\|\.\)\=pylint[-0-9]*\>''' )[0] - let parsed_ver = syntastic#util#parseVersion(substitute(pylint_version, '\v^\S+\s+', '', '')) - call self.setVersion(parsed_ver) - - let s:pylint_new = syntastic#util#versionIsAtLeast(parsed_ver, [1]) - catch /\m^Vim\%((\a\+)\)\=:E684/ - call syntastic#log#ndebug(g:_SYNTASTIC_DEBUG_LOCLIST, 'checker output:', split(version_output, "\n", 1)) - call syntastic#log#error("checker python/pylint: can't parse version string (abnormal termination?)") - let s:pylint_new = -1 - endtry - - return s:pylint_new >= 0 -endfunction " }}}1 - -function! SyntaxCheckers_python_pylint_GetLocList() dict " {{{1 - let makeprg = self.makeprgBuild({ - \ 'args_after': (s:pylint_new ? - \ '-f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n' : - \ '-f parseable -r n -i y') }) - - let errorformat = - \ '%A%f:%l:%c:%t: %m,' . - \ '%A%f:%l: %m,' . - \ '%A%f:(%l): %m,' . - \ '%-Z%p^%.%#,' . - \ '%-G%.%#' - - let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } - - let loclist = SyntasticMake({ - \ 'makeprg': makeprg, - \ 'errorformat': errorformat, - \ 'env': env, - \ 'returns': range(32) }) - - for e in loclist - if !s:pylint_new - let e['type'] = e['text'][1] - endif - - if e['type'] =~? '\m^[EF]' - let e['type'] = 'E' - elseif e['type'] =~? '\m^[CRW]' - let e['type'] = 'W' - else - let e['valid'] = 0 - endif - - let e['col'] += 1 - let e['vcol'] = 0 - endfor - - return loclist -endfunction " }}}1 - -call g:SyntasticRegistry.CreateAndRegisterChecker({ - \ 'filetype': 'python', - \ 'name': 'pylint' }) - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim: set sw=4 sts=4 et fdm=marker: |