2012-02-20 05:20:48 -05:00
|
|
|
"============================================================================
|
|
|
|
"File: pylint.vim
|
|
|
|
"Description: Syntax checking plugin for syntastic.vim
|
|
|
|
"Author: Parantapa Bhattacharya <parantapa at gmail dot com>
|
|
|
|
"
|
|
|
|
"============================================================================
|
|
|
|
function! SyntaxCheckers_python_GetLocList()
|
2013-01-20 06:07:05 -05:00
|
|
|
let makeprg = syntastic#makeprg#build({
|
|
|
|
\ 'exe': 'pylint',
|
|
|
|
\ 'args': g:syntastic_python_checker_args. ' -f parseable -r n -i y',
|
2013-01-20 07:27:19 -05:00
|
|
|
\ 'tail': s:MakeprgTail(),
|
2013-01-20 06:07:05 -05:00
|
|
|
\ 'subchecker': 'pylint' })
|
2012-06-27 13:21:43 -04:00
|
|
|
let errorformat = '%f:%l: [%t] %m,%Z,%-GNo config %m'
|
2013-01-20 06:07:05 -05:00
|
|
|
|
2012-02-20 05:20:48 -05:00
|
|
|
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
|
|
|
endfunction
|
2013-01-20 07:27:19 -05:00
|
|
|
|
|
|
|
function! s:MakeprgTail()
|
|
|
|
return ' 2>&1 \| sed ''s_: \[\([RCW]\)_: \[W] \[\1_''' .
|
|
|
|
\ ' \| sed ''s_: \[\([FE]\)_:\ \[E] \[\1_'''
|
|
|
|
|
|
|
|
endfunction
|