summaryrefslogtreecommitdiff
path: root/ale_linters/python/prospector.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/python/prospector.vim')
-rw-r--r--ale_linters/python/prospector.vim11
1 files changed, 9 insertions, 2 deletions
diff --git a/ale_linters/python/prospector.vim b/ale_linters/python/prospector.vim
index f2968a05..fff37147 100644
--- a/ale_linters/python/prospector.vim
+++ b/ale_linters/python/prospector.vim
@@ -7,14 +7,21 @@ let g:ale_python_prospector_executable =
let g:ale_python_prospector_options =
\ get(g:, 'ale_python_prospector_options', '')
-let g:ale_python_prospector_use_global = get(g:, 'ale_python_prospector_use_global', 0)
+let g:ale_python_prospector_use_global = get(g:, 'ale_python_prospector_use_global', get(g:, 'ale_use_global_executables', 0))
function! ale_linters#python#prospector#GetExecutable(buffer) abort
return ale#python#FindExecutable(a:buffer, 'python_prospector', ['prospector'])
endfunction
function! ale_linters#python#prospector#GetCommand(buffer) abort
- return ale#Escape(ale_linters#python#prospector#GetExecutable(a:buffer))
+ let l:executable = ale_linters#python#prospector#GetExecutable(a:buffer)
+
+ let l:exec_args = l:executable =~? 'pipenv$'
+ \ ? ' run prospector'
+ \ : ''
+
+ return ale#Escape(l:executable)
+ \ . l:exec_args
\ . ' ' . ale#Var(a:buffer, 'python_prospector_options')
\ . ' --messages-only --absolute-paths --zero-exit --output-format json'
\ . ' %s'