From ca88e67af0dc159bdb78ad9f038d2c9336fb1b71 Mon Sep 17 00:00:00 2001 From: Eddie Lebow Date: Mon, 4 Jun 2018 22:43:02 -0400 Subject: 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` --- ale_linters/python/pylint.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ale_linters/python/pylint.vim') diff --git a/ale_linters/python/pylint.vim b/ale_linters/python/pylint.vim index a6fc8ed4..9239f835 100644 --- a/ale_linters/python/pylint.vim +++ b/ale_linters/python/pylint.vim @@ -15,8 +15,14 @@ function! ale_linters#python#pylint#GetCommand(buffer) abort \ ? ale#path#BufferCdString(a:buffer) \ : '' + let l:executable = ale_linters#python#pylint#GetExecutable(a:buffer) + + let l:exec_args = l:executable =~? 'pipenv$' + \ ? ' run pylint' + \ : '' + return l:cd_string - \ . ale#Escape(ale_linters#python#pylint#GetExecutable(a:buffer)) + \ . ale#Escape(l:executable) . l:exec_args \ . ' ' . ale#Var(a:buffer, 'python_pylint_options') \ . ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n' \ . ' %s' -- cgit v1.2.3