mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-16 01:07:06 +08:00
Escape the pylint executable appropriately
This commit is contained in:
@@ -6,6 +6,9 @@ Before:
|
||||
|
||||
After:
|
||||
silent execute 'cd ' . fnameescape(g:dir)
|
||||
" Set the file to something else,
|
||||
" or we'll cause issues when running other tests
|
||||
silent file 'dummy.py'
|
||||
unlet! g:dir
|
||||
|
||||
call ale#linter#Reset()
|
||||
@@ -21,6 +24,16 @@ Execute(The pylint callbacks should return the correct default values):
|
||||
\ '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'
|
||||
|
||||
AssertEqual
|
||||
\ 'executable with spaces',
|
||||
\ ale_linters#python#pylint#GetExecutable(bufnr(''))
|
||||
AssertEqual
|
||||
\ 'executable\ with\ spaces ' . b:command_tail,
|
||||
\ ale_linters#python#pylint#GetCommand(bufnr(''))
|
||||
|
||||
Execute(The pylint command callback should let you set options):
|
||||
let g:ale_python_pylint_options = '--some-option'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user