diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-09-19 19:46:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-19 19:46:13 +0100 |
commit | 169a6e26b2ca63ab0f2f5bb3d2176ff0a2f68bc3 (patch) | |
tree | 4a561b7ec1d056eb30a4b988625b4a4c3d8d49e1 /ale_linters/python/prospector.vim | |
parent | e82bcdb8a6dc888130c03bc80cba492051c5ffbf (diff) | |
parent | dbe93529352880068cb738abb93a1bc009bf73ed (diff) | |
download | ale-169a6e26b2ca63ab0f2f5bb3d2176ff0a2f68bc3.zip |
Merge pull request #1719 from elebow/auto-pipenv-option-for-python-linters
Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
Diffstat (limited to 'ale_linters/python/prospector.vim')
-rw-r--r-- | ale_linters/python/prospector.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ale_linters/python/prospector.vim b/ale_linters/python/prospector.vim index fff37147..b01cec87 100644 --- a/ale_linters/python/prospector.vim +++ b/ale_linters/python/prospector.vim @@ -1,6 +1,8 @@ " Author: chocoelho <carlospecter@gmail.com> " Description: prospector linter python files +call ale#Set('python_prospector_auto_pipenv', 0) + let g:ale_python_prospector_executable = \ get(g:, 'ale_python_prospector_executable', 'prospector') @@ -10,6 +12,11 @@ let g:ale_python_prospector_options = 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 + if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_prospector_auto_pipenv')) + \ && ale#python#PipenvPresent(a:buffer) + return 'pipenv' + endif + return ale#python#FindExecutable(a:buffer, 'python_prospector', ['prospector']) endfunction |