summaryrefslogtreecommitdiff
path: root/ale_linters/python
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-05-28 19:52:27 +0100
committerw0rp <devw0rp@gmail.com>2018-05-28 19:52:27 +0100
commit191967cfeec78f3ba83d999462fe6e45e4f4c8de (patch)
tree4eec1a5e8c76da26108886f4711632e8d944bb5b /ale_linters/python
parentc0a279f967ea9272b47063b52374730ad596f159 (diff)
downloadale-191967cfeec78f3ba83d999462fe6e45e4f4c8de.zip
#1587 - Add deprecation warnings for old linter options
Diffstat (limited to 'ale_linters/python')
-rw-r--r--ale_linters/python/flake8.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/ale_linters/python/flake8.vim b/ale_linters/python/flake8.vim
index 9d314d85..7398b1dc 100644
--- a/ale_linters/python/flake8.vim
+++ b/ale_linters/python/flake8.vim
@@ -1,7 +1,9 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: flake8 for python files
+" remove in 2.0
" Support an old setting as a fallback.
+let s:deprecation_warning_echoed = 0
let s:default_options = get(g:, 'ale_python_flake8_args', '')
call ale#Set('python_flake8_executable', 'flake8')
@@ -38,6 +40,12 @@ function! ale_linters#python#flake8#VersionCheck(buffer) abort
endfunction
function! ale_linters#python#flake8#GetCommand(buffer, version_output) abort
+ " remove in 2.0
+ if exists('g:ale_python_flake8_args') && !s:deprecation_warning_echoed
+ execute 'echom ''Rename your g:ale_python_flake8_args setting to g:ale_python_flake8_options instead. Support for this will removed in ALE 2.0.'''
+ let s:deprecation_warning_echoed = 1
+ endif
+
let l:cd_string = ale#Var(a:buffer, 'python_flake8_change_directory')
\ ? ale#path#BufferCdString(a:buffer)
\ : ''