summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-04-17 13:33:47 +0100
committerw0rp <devw0rp@gmail.com>2018-04-17 13:33:47 +0100
commit4c3bd8a84f990c362d7a927c2349dd4cc5e6c2d1 (patch)
tree865174b5572e8a7cb48d8a8c78948c90274f9cba
parentd1224a05c44f41d1592a756141eedf172c083ed1 (diff)
downloadale-1.8.1.zip
Revert "Merge pull request #1487 from rhysd/fix-1472"v1.8.1
This reverts commit 67b71653f54b8695f928adcb6781dd9a25483873.
-rw-r--r--ale_linters/python/pylint.vim3
-rw-r--r--test/command_callback/test_pylint_command_callback.vader18
2 files changed, 7 insertions, 14 deletions
diff --git a/ale_linters/python/pylint.vim b/ale_linters/python/pylint.vim
index 2c4ef5fe..755d937d 100644
--- a/ale_linters/python/pylint.vim
+++ b/ale_linters/python/pylint.vim
@@ -14,8 +14,7 @@ function! ale_linters#python#pylint#GetExecutable(buffer) abort
endfunction
function! ale_linters#python#pylint#GetCommand(buffer) abort
- return ale#path#BufferCdString(a:buffer)
- \ . ale#Escape(ale_linters#python#pylint#GetExecutable(a:buffer))
+ return ale#Escape(ale_linters#python#pylint#GetExecutable(a:buffer))
\ . ' ' . ale#Var(a:buffer, 'python_pylint_options')
\ . ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n'
\ . ' %s'
diff --git a/test/command_callback/test_pylint_command_callback.vader b/test/command_callback/test_pylint_command_callback.vader
index 5dc6abe9..1ff8e354 100644
--- a/test/command_callback/test_pylint_command_callback.vader
+++ b/test/command_callback/test_pylint_command_callback.vader
@@ -28,8 +28,7 @@ Execute(The pylint callbacks should return the correct default values):
\ 'pylint',
\ ale_linters#python#pylint#GetExecutable(bufnr(''))
AssertEqual
- \ ale#path#BufferCdString(bufnr(''))
- \ . ale#Escape('pylint') . ' ' . b:command_tail,
+ \ ale#Escape('pylint') . ' ' . b:command_tail,
\ ale_linters#python#pylint#GetCommand(bufnr(''))
Execute(The pylint executable should be configurable, and escaped properly):
@@ -39,16 +38,14 @@ Execute(The pylint executable should be configurable, and escaped properly):
\ 'executable with spaces',
\ ale_linters#python#pylint#GetExecutable(bufnr(''))
AssertEqual
- \ ale#path#BufferCdString(bufnr(''))
- \ . ale#Escape('executable with spaces') . ' ' . b:command_tail,
+ \ ale#Escape('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'
AssertEqual
- \ ale#path#BufferCdString(bufnr(''))
- \ . ale#Escape('pylint') . ' --some-option' . b:command_tail,
+ \ ale#Escape('pylint') . ' --some-option' . b:command_tail,
\ ale_linters#python#pylint#GetCommand(bufnr(''))
Execute(The pylint callbacks shouldn't detect virtualenv directories where they don't exist):
@@ -58,8 +55,7 @@ Execute(The pylint callbacks shouldn't detect virtualenv directories where they
\ 'pylint',
\ ale_linters#python#pylint#GetExecutable(bufnr(''))
AssertEqual
- \ ale#path#BufferCdString(bufnr(''))
- \ . ale#Escape('pylint') . ' ' . b:command_tail,
+ \ ale#Escape('pylint') . ' ' . b:command_tail,
\ ale_linters#python#pylint#GetCommand(bufnr(''))
Execute(The pylint callbacks should detect virtualenv directories):
@@ -74,8 +70,7 @@ Execute(The pylint callbacks should detect virtualenv directories):
\ ale_linters#python#pylint#GetExecutable(bufnr(''))
AssertEqual
- \ ale#path#BufferCdString(bufnr(''))
- \ . ale#Escape(b:executable) . ' ' . b:command_tail,
+ \ ale#Escape(b:executable) . ' ' . b:command_tail,
\ ale_linters#python#pylint#GetCommand(bufnr(''))
Execute(You should able able to use the global pylint instead):
@@ -86,6 +81,5 @@ Execute(You should able able to use the global pylint instead):
\ 'pylint',
\ ale_linters#python#pylint#GetExecutable(bufnr(''))
AssertEqual
- \ ale#path#BufferCdString(bufnr(''))
- \ . ale#Escape('pylint') . ' ' . b:command_tail,
+ \ ale#Escape('pylint') . ' ' . b:command_tail,
\ ale_linters#python#pylint#GetCommand(bufnr(''))