diff options
author | w0rp <devw0rp@gmail.com> | 2018-04-17 13:30:30 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-04-17 13:30:30 +0100 |
commit | f9ba3d924fc445ceea6ab7a6700b95dd12d268ca (patch) | |
tree | 41d169514dc43d61f71e7bdf3052af9789015310 /ale_linters/python/pylint.vim | |
parent | fb720251bf38139c1811665852e1bc2f73d0393f (diff) | |
download | ale-f9ba3d924fc445ceea6ab7a6700b95dd12d268ca.zip |
Fix #1507 - Add an option for disabling switching directories for pylint
Diffstat (limited to 'ale_linters/python/pylint.vim')
-rw-r--r-- | ale_linters/python/pylint.vim | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ale_linters/python/pylint.vim b/ale_linters/python/pylint.vim index 5eafd8f7..a6fc8ed4 100644 --- a/ale_linters/python/pylint.vim +++ b/ale_linters/python/pylint.vim @@ -1,20 +1,21 @@ " Author: keith <k@keith.so> " Description: pylint for python files -let g:ale_python_pylint_executable = -\ get(g:, 'ale_python_pylint_executable', 'pylint') - -let g:ale_python_pylint_options = -\ get(g:, 'ale_python_pylint_options', '') - -let g:ale_python_pylint_use_global = get(g:, 'ale_python_pylint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_pylint_executable', 'pylint') +call ale#Set('python_pylint_options', '') +call ale#Set('python_pylint_use_global', get(g:, 'ale_use_global_executables', 0)) +call ale#Set('python_pylint_change_directory', 1) function! ale_linters#python#pylint#GetExecutable(buffer) abort return ale#python#FindExecutable(a:buffer, 'python_pylint', ['pylint']) endfunction function! ale_linters#python#pylint#GetCommand(buffer) abort - return ale#path#BufferCdString(a:buffer) + let l:cd_string = ale#Var(a:buffer, 'python_pylint_change_directory') + \ ? ale#path#BufferCdString(a:buffer) + \ : '' + + return l:cd_string \ . 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' |