diff options
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/engine.vim | 20 | ||||
-rw-r--r-- | autoload/ale/fix.vim | 4 | ||||
-rw-r--r-- | autoload/ale/linter.vim | 8 |
3 files changed, 27 insertions, 5 deletions
diff --git a/autoload/ale/engine.vim b/autoload/ale/engine.vim index 340f6913..6b312b4f 100644 --- a/autoload/ale/engine.vim +++ b/autoload/ale/engine.vim @@ -107,24 +107,36 @@ endfunction " Register a temporary file to be managed with the ALE engine for " a current job run. function! ale#engine#ManageFile(buffer, filename) abort - " TODO: Emit deprecation warning here later. + if !get(g:, 'ale_ignore_2_4_warnings') + execute 'echom ''ale#engine#ManageFile is deprecated. Use `let g:ale_ignore_2_4_warnings = 1` to disable this message.''' + endif + call ale#command#ManageFile(a:buffer, a:filename) endfunction " Same as the above, but manage an entire directory. function! ale#engine#ManageDirectory(buffer, directory) abort - " TODO: Emit deprecation warning here later. + if !get(g:, 'ale_ignore_2_4_warnings') + execute 'echom ''ale#engine#ManageDirectory is deprecated. Use `let g:ale_ignore_2_4_warnings = 1` to disable this message.''' + endif + call ale#command#ManageDirectory(a:buffer, a:directory) endfunction function! ale#engine#CreateFile(buffer) abort - " TODO: Emit deprecation warning here later. + if !get(g:, 'ale_ignore_2_4_warnings') + execute 'echom ''ale#engine#CreateFile is deprecated. Use `let g:ale_ignore_2_4_warnings = 1` to disable this message.''' + endif + return ale#command#CreateFile(a:buffer) endfunction " Create a new temporary directory and manage it in one go. function! ale#engine#CreateDirectory(buffer) abort - " TODO: Emit deprecation warning here later. + if !get(g:, 'ale_ignore_2_4_warnings') + execute 'echom ''ale#engine#CreateDirectory is deprecated. Use `let g:ale_ignore_2_4_warnings = 1` to disable this message.''' + endif + return ale#command#CreateDirectory(a:buffer) endfunction diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim index b8674606..c0f05611 100644 --- a/autoload/ale/fix.vim +++ b/autoload/ale/fix.vim @@ -117,6 +117,10 @@ function! s:HandleExit(job_info, buffer, job_output, data) abort let l:input = a:job_info.input endif + if l:ChainCallback isnot v:null && !get(g:, 'ale_ignore_2_4_warnings') + execute 'echom ''chain_with is deprecated. Use `let g:ale_ignore_2_4_warnings = 1` to disable this message.''' + endif + let l:next_index = l:ChainCallback is v:null \ ? a:job_info.callback_index + 1 \ : a:job_info.callback_index diff --git a/autoload/ale/linter.vim b/autoload/ale/linter.vim index d680391d..273778c7 100644 --- a/autoload/ale/linter.vim +++ b/autoload/ale/linter.vim @@ -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 |