mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-27 22:41:10 +08:00
Allow all Python linter executables to be set to pipenv.
It appends ` run {linter_name}`, analogously to the Ruby linters when
the executable is set to `bundle`
This commit is contained in:
@@ -14,7 +14,14 @@ function! ale_linters#python#prospector#GetExecutable(buffer) abort
|
||||
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'
|
||||
|
||||
Reference in New Issue
Block a user