Fix #208 - Use the file on disk for pylint, and follow import paths
This commit is contained in:
parent
2e1c9b0fa5
commit
f2c9fc403a
@ -29,7 +29,7 @@ function! ale_linters#python#pylint#GetCommand(buffer) abort
|
|||||||
return ale_linters#python#pylint#GetExecutable(a:buffer)
|
return ale_linters#python#pylint#GetExecutable(a:buffer)
|
||||||
\ . ' ' . ale#Var(a:buffer, 'python_pylint_options')
|
\ . ' ' . ale#Var(a:buffer, 'python_pylint_options')
|
||||||
\ . ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n'
|
\ . ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n'
|
||||||
\ . ' %t'
|
\ . ' %s'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
call ale#linter#Define('python', {
|
call ale#linter#Define('python', {
|
||||||
@ -37,4 +37,5 @@ call ale#linter#Define('python', {
|
|||||||
\ 'executable_callback': 'ale_linters#python#pylint#GetExecutable',
|
\ 'executable_callback': 'ale_linters#python#pylint#GetExecutable',
|
||||||
\ 'command_callback': 'ale_linters#python#pylint#GetCommand',
|
\ 'command_callback': 'ale_linters#python#pylint#GetCommand',
|
||||||
\ 'callback': 'ale#handlers#python#HandlePEP8Format',
|
\ 'callback': 'ale#handlers#python#HandlePEP8Format',
|
||||||
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
@ -2,7 +2,7 @@ Before:
|
|||||||
runtime ale_linters/python/pylint.vim
|
runtime ale_linters/python/pylint.vim
|
||||||
silent! execute 'cd /testplugin/test/command_callback'
|
silent! execute 'cd /testplugin/test/command_callback'
|
||||||
let g:dir = getcwd()
|
let g:dir = getcwd()
|
||||||
let b:command_tail = ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n %t'
|
let b:command_tail = ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n %s'
|
||||||
|
|
||||||
After:
|
After:
|
||||||
silent execute 'cd ' . fnameescape(g:dir)
|
silent execute 'cd ' . fnameescape(g:dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user