Pylint: use symbolic names in messages. Add column information.
This commit is contained in:
parent
c78cf647a3
commit
12b3c071a5
@ -23,9 +23,10 @@ endfunction
|
|||||||
|
|
||||||
function! SyntaxCheckers_python_pylint_GetLocList() dict
|
function! SyntaxCheckers_python_pylint_GetLocList() dict
|
||||||
let makeprg = self.makeprgBuild({
|
let makeprg = self.makeprgBuild({
|
||||||
\ 'args': (s:pylint_new ? '--msg-template="{path}:{line}: [{msg_id}] {msg}" -r n' : '-f parseable -r n -i y') })
|
\ 'args': (s:pylint_new ? '--msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n' : '-f parseable -r n -i y') })
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
|
\ '%A%f:%l:%c:%t: %m,' .
|
||||||
\ '%A%f:%l: %m,' .
|
\ '%A%f:%l: %m,' .
|
||||||
\ '%A%f:(%l): %m,' .
|
\ '%A%f:(%l): %m,' .
|
||||||
\ '%-Z%p^%.%#,' .
|
\ '%-Z%p^%.%#,' .
|
||||||
@ -38,10 +39,13 @@ function! SyntaxCheckers_python_pylint_GetLocList() dict
|
|||||||
\ 'returns': range(32) })
|
\ 'returns': range(32) })
|
||||||
|
|
||||||
for e in loclist
|
for e in loclist
|
||||||
let type = e['text'][1]
|
if !s:pylint_new
|
||||||
if type =~# '\m^[EF]'
|
let e['type'] = e['text'][1]
|
||||||
|
endif
|
||||||
|
|
||||||
|
if e['type'] =~? '\m^[EF]'
|
||||||
let e['type'] = 'E'
|
let e['type'] = 'E'
|
||||||
elseif type =~# '\m^[CRW]'
|
elseif e['type'] =~? '\m^[CRW]'
|
||||||
let e['type'] = 'W'
|
let e['type'] = 'W'
|
||||||
else
|
else
|
||||||
let e['valid'] = 0
|
let e['valid'] = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user