summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-06 19:30:41 +0100
committerw0rp <devw0rp@gmail.com>2017-05-06 19:30:41 +0100
commitf2c9fc403a5c25a3b9265095f3b6d4cfac80c99e (patch)
treeb101ea575984ef2d0edd190dbce58cce46888af5
parent2e1c9b0fa574aa2e617734470d5dbec61abee928 (diff)
downloadale-f2c9fc403a5c25a3b9265095f3b6d4cfac80c99e.zip
Fix #208 - Use the file on disk for pylint, and follow import paths
-rw-r--r--ale_linters/python/pylint.vim3
-rw-r--r--test/command_callback/test_pylint_command_callback.vader2
2 files changed, 3 insertions, 2 deletions
diff --git a/ale_linters/python/pylint.vim b/ale_linters/python/pylint.vim
index 3ee8bb02..fa76a076 100644
--- a/ale_linters/python/pylint.vim
+++ b/ale_linters/python/pylint.vim
@@ -29,7 +29,7 @@ function! ale_linters#python#pylint#GetCommand(buffer) abort
return 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'
- \ . ' %t'
+ \ . ' %s'
endfunction
call ale#linter#Define('python', {
@@ -37,4 +37,5 @@ call ale#linter#Define('python', {
\ 'executable_callback': 'ale_linters#python#pylint#GetExecutable',
\ 'command_callback': 'ale_linters#python#pylint#GetCommand',
\ 'callback': 'ale#handlers#python#HandlePEP8Format',
+\ 'lint_file': 1,
\})
diff --git a/test/command_callback/test_pylint_command_callback.vader b/test/command_callback/test_pylint_command_callback.vader
index bd57a828..7c8e4080 100644
--- a/test/command_callback/test_pylint_command_callback.vader
+++ b/test/command_callback/test_pylint_command_callback.vader
@@ -2,7 +2,7 @@ Before:
runtime ale_linters/python/pylint.vim
silent! execute 'cd /testplugin/test/command_callback'
let g:dir = getcwd()
- let b:command_tail = ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n %t'
+ let b:command_tail = ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n %s'
After:
silent execute 'cd ' . fnameescape(g:dir)