2017-08-25 07:46:56 -04:00
|
|
|
Before:
|
|
|
|
runtime ale_linters/python/pycodestyle.vim
|
|
|
|
Save g:ale_python_pycodestyle_executable,
|
|
|
|
\ g:ale_python_pycodestyle_options,
|
|
|
|
\ g:ale_python_pycodestyle_use_global
|
|
|
|
|
|
|
|
After:
|
|
|
|
call ale#linter#Reset()
|
|
|
|
Restore
|
|
|
|
|
|
|
|
Execute(The pycodestyle command callback should return default string):
|
2017-10-08 18:26:50 -04:00
|
|
|
AssertEqual ale#Escape('pycodestyle') . ' -',
|
2017-08-25 07:46:56 -04:00
|
|
|
\ ale_linters#python#pycodestyle#GetCommand(bufnr(''))
|
|
|
|
|
|
|
|
Execute(The pycodestyle command callback should allow options):
|
|
|
|
let g:ale_python_pycodestyle_options = '--exclude=test*.py'
|
2017-10-08 18:26:50 -04:00
|
|
|
|
|
|
|
AssertEqual ale#Escape('pycodestyle') . ' --exclude=test*.py -',
|
2017-08-25 07:46:56 -04:00
|
|
|
\ ale_linters#python#pycodestyle#GetCommand(bufnr(''))
|
|
|
|
|
|
|
|
Execute(The pycodestyle executable should be configurable):
|
|
|
|
let g:ale_python_pycodestyle_executable = '~/.local/bin/pycodestyle'
|
2017-10-08 18:26:50 -04:00
|
|
|
|
|
|
|
AssertEqual ale#Escape('~/.local/bin/pycodestyle') . ' -',
|
2017-08-25 07:46:56 -04:00
|
|
|
\ ale_linters#python#pycodestyle#GetCommand(bufnr(''))
|