Skip to content

Commit

Permalink
Revert "Merge pull request #1487 from rhysd/fix-1472"
Browse files Browse the repository at this point in the history
This reverts commit 67b7165.
  • Loading branch information
w0rp committed Apr 17, 2018
1 parent d1224a0 commit 4c3bd8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
3 changes: 1 addition & 2 deletions ale_linters/python/pylint.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
18 changes: 6 additions & 12 deletions test/command_callback/test_pylint_command_callback.vader
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand All @@ -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(''))

0 comments on commit 4c3bd8a

Please sign in to comment.