Close #2132 - Add deprecation warnings for old features

This commit is contained in:
w0rp
2019-04-07 16:24:08 +01:00
parent e85eb82401
commit ce64e349cd
5 changed files with 33 additions and 9 deletions

View File

@@ -340,7 +340,13 @@ function! ale#linter#PreProcess(filetype, linter) abort
throw '`aliases` must be a List of String values'
endif
" TODO: Emit deprecation warnings for deprecated options later.
for l:key in filter(keys(l:obj), 'v:val[-9:] is# ''_callback'' || v:val is# ''command_chain''')
if !get(g:, 'ale_ignore_2_4_warnings')
execute 'echom l:key . '' is deprecated. Use `let g:ale_ignore_2_4_warnings = 1` to disable this message.'''
endif
break
endfor
return l:obj
endfunction