mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-07 05:04:28 +08:00
Fix #1566 - Add g:ale_python_flake8_change_directory
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user