Fix #1566 - Add g:ale_python_flake8_change_directory

This commit is contained in:
w0rp
2018-05-28 16:34:54 +01:00
parent d9717147bf
commit 8a659b7cc6
3 changed files with 28 additions and 7 deletions

View File

@@ -2,11 +2,13 @@ Before:
Save g:ale_python_flake8_executable
Save g:ale_python_flake8_options
Save g:ale_python_flake8_use_global
Save g:ale_python_flake8_change_directory
unlet! g:ale_python_flake8_executable
unlet! g:ale_python_flake8_args
unlet! g:ale_python_flake8_options
unlet! g:ale_python_flake8_use_global
unlet! g:ale_python_flake8_change_directory
let b:bin_dir = has('win32') ? 'Scripts' : 'bin'
@@ -44,6 +46,13 @@ Execute(The flake8 callbacks should return the correct default values):
\ . ale#Escape('flake8') . ' --format=default -',
\ ale_linters#python#flake8#GetCommand(bufnr(''), ['2.9.9'])
Execute(The option for disabling changing directories should work):
let g:ale_python_flake8_change_directory = 0
AssertEqual
\ ale#Escape('flake8') . ' --format=default --stdin-display-name %s -',
\ ale_linters#python#flake8#GetCommand(bufnr(''), ['3.0.0'])
Execute(The flake8 command callback should let you set options):
let g:ale_python_flake8_options = '--some-option'