mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-07 05:04:28 +08:00
Fix #1507 - Add an option for disabling switching directories for pylint
This commit is contained in:
@@ -2,10 +2,12 @@ Before:
|
||||
Save g:ale_python_pylint_executable
|
||||
Save g:ale_python_pylint_options
|
||||
Save g:ale_python_pylint_use_global
|
||||
Save g:ale_python_pylint_change_directory
|
||||
|
||||
unlet! g:ale_python_pylint_executable
|
||||
unlet! g:ale_python_pylint_options
|
||||
unlet! g:ale_python_pylint_use_global
|
||||
unlet! g:ale_python_pylint_change_directory
|
||||
|
||||
runtime ale_linters/python/pylint.vim
|
||||
call ale#test#SetDirectory('/testplugin/test/command_callback')
|
||||
@@ -32,6 +34,17 @@ Execute(The pylint callbacks should return the correct default values):
|
||||
\ . ale#Escape('pylint') . ' ' . b:command_tail,
|
||||
\ ale_linters#python#pylint#GetCommand(bufnr(''))
|
||||
|
||||
Execute(The option for disabling changing directories should work):
|
||||
let g:ale_python_pylint_change_directory = 0
|
||||
|
||||
AssertEqual
|
||||
\ 'pylint',
|
||||
\ ale_linters#python#pylint#GetExecutable(bufnr(''))
|
||||
\
|
||||
AssertEqual
|
||||
\ ale#Escape('pylint') . ' ' . b:command_tail,
|
||||
\ ale_linters#python#pylint#GetCommand(bufnr(''))
|
||||
|
||||
Execute(The pylint executable should be configurable, and escaped properly):
|
||||
let g:ale_python_pylint_executable = 'executable with spaces'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user