pylint: Move to the buffer's directory before running pylint command (Fix #1472)

This commit is contained in:
rhysd
2018-04-09 16:41:35 +09:00
parent 2f2dcb8444
commit 4903b966a7
2 changed files with 14 additions and 7 deletions

View File

@@ -14,7 +14,8 @@ function! ale_linters#python#pylint#GetExecutable(buffer) abort
endfunction
function! ale_linters#python#pylint#GetCommand(buffer) abort
return ale#Escape(ale_linters#python#pylint#GetExecutable(a:buffer))
return ale#path#BufferCdString(a:buffer)
\ . ale#Escape(ale_linters#python#pylint#GetExecutable(a:buffer))
\ . ' ' . ale#Var(a:buffer, 'python_pylint_options')
\ . ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n'
\ . ' %s'