diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-04-27 21:39:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-27 21:39:04 +0100 |
commit | d1d705cc8484d935c0c18857f152027491df355e (patch) | |
tree | f3e0c500cb893cfc87058bf21447ad6750b09d80 /ale_linters | |
parent | 4a63a90d0d6dab3887f995f0d7ec2ee2ba2ff382 (diff) | |
parent | 603e61ad7158a8e2ac6acef2417280debf63a151 (diff) | |
download | ale-d1d705cc8484d935c0c18857f152027491df355e.zip |
Merge pull request #1533 from inducer/master
flake8: Move to the buffer's directory before running flake8 command
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/python/flake8.vim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ale_linters/python/flake8.vim b/ale_linters/python/flake8.vim index 4de4daff..4ed41935 100644 --- a/ale_linters/python/flake8.vim +++ b/ale_linters/python/flake8.vim @@ -39,6 +39,7 @@ function! ale_linters#python#flake8#VersionCheck(buffer) abort endfunction function! ale_linters#python#flake8#GetCommand(buffer, version_output) abort + let l:cd_string = ale#path#BufferCdString(a:buffer) let l:executable = ale_linters#python#flake8#GetExecutable(a:buffer) let l:version = ale#semver#GetVersion(l:executable, a:version_output) @@ -50,7 +51,8 @@ function! ale_linters#python#flake8#GetCommand(buffer, version_output) abort let l:options = ale#Var(a:buffer, 'python_flake8_options') - return ale#Escape(l:executable) + return l:cd_string + \ . ale#Escape(l:executable) \ . (!empty(l:options) ? ' ' . l:options : '') \ . ' --format=default' \ . l:display_name_args . ' -' |