summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-07-04 08:36:34 +0100
committerw0rp <devw0rp@gmail.com>2018-07-04 08:36:34 +0100
commitdb85b931ec83de3382b75b7e9a18f1cf8ae8ce43 (patch)
tree83ef9e529fe2cb57c5ee4392cebb31af24b4c69d /autoload
parent602e7fa00f50de2af3a35e1cc0a536be07947d5a (diff)
downloadale-db85b931ec83de3382b75b7e9a18f1cf8ae8ce43.zip
Remove deprecated code for the 2.0 releasev2.0.0
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/engine.vim3
-rw-r--r--autoload/ale/statusline.vim52
2 files changed, 0 insertions, 55 deletions
diff --git a/autoload/ale/engine.vim b/autoload/ale/engine.vim
index 714c75b1..d97b6937 100644
--- a/autoload/ale/engine.vim
+++ b/autoload/ale/engine.vim
@@ -270,9 +270,6 @@ function! ale#engine#SetResults(buffer, loclist) abort
" Call user autocommands. This allows users to hook into ALE's lint cycle.
silent doautocmd <nomodeline> User ALELintPost
- " remove in 2.0
- " Old DEPRECATED name; call it for backwards compatibility.
- silent doautocmd <nomodeline> User ALELint
endif
endfunction
diff --git a/autoload/ale/statusline.vim b/autoload/ale/statusline.vim
index 851618cc..94fbd6c9 100644
--- a/autoload/ale/statusline.vim
+++ b/autoload/ale/statusline.vim
@@ -1,14 +1,6 @@
" Author: KabbAmine <amine.kabb@gmail.com>
" Description: Statusline related function(s)
-" remove in 2.0
-"
-" A deprecated setting for ale#statusline#Status()
-" See :help ale#statusline#Count() for getting status reports.
-let g:ale_statusline_format = get(g:, 'ale_statusline_format',
-\ ['%d error(s)', '%d warning(s)', 'OK']
-\)
-
function! s:CreateCountDict() abort
" Keys 0 and 1 are for backwards compatibility.
" The count object used to be a List of [error_count, warning_count].
@@ -76,47 +68,3 @@ function! ale#statusline#Count(buffer) abort
" The Dictionary is copied here before exposing it to other plugins.
return copy(s:GetCounts(a:buffer))
endfunction
-
-" This is the historical format setting which could be configured before.
-function! s:StatusForListFormat() abort
- let [l:error_format, l:warning_format, l:no_errors] = g:ale_statusline_format
- let l:counts = s:GetCounts(bufnr(''))
-
- " Build strings based on user formatting preferences.
- let l:errors = l:counts[0] ? printf(l:error_format, l:counts[0]) : ''
- let l:warnings = l:counts[1] ? printf(l:warning_format, l:counts[1]) : ''
-
- " Different formats based on the combination of errors and warnings.
- if empty(l:errors) && empty(l:warnings)
- let l:res = l:no_errors
- elseif !empty(l:errors) && !empty(l:warnings)
- let l:res = printf('%s %s', l:errors, l:warnings)
- else
- let l:res = empty(l:errors) ? l:warnings : l:errors
- endif
-
- return l:res
-endfunction
-
-" remove in 2.0
-"
-" Returns a formatted string that can be integrated in the statusline.
-"
-" This function is deprecated, and should not be used. Use the airline plugin
-" instead, or write your own status function with ale#statusline#Count()
-function! ale#statusline#Status() abort
- if !get(g:, 'ale_deprecation_ale_statusline_status', 0)
- execute 'echom ''ale#statusline#Status() is deprecated, use ale#statusline#Count() to write your own function.'''
- let g:ale_deprecation_ale_statusline_status = 1
- endif
-
- if !exists('g:ale_statusline_format')
- return 'OK'
- endif
-
- if type(g:ale_statusline_format) == type([])
- return s:StatusForListFormat()
- endif
-
- return ''
-endfunction