mirror of
https://github.com/amix/vimrc
synced 2025-07-27 15:04:59 +08:00
Updated plugins
This commit is contained in:
@ -245,32 +245,32 @@ function! ale#fix#registry#Add(name, func, filetypes, desc, ...) abort
|
||||
" This command will throw from the sandbox.
|
||||
let &equalprg=&equalprg
|
||||
|
||||
if type(a:name) != type('')
|
||||
if type(a:name) isnot v:t_string
|
||||
throw '''name'' must be a String'
|
||||
endif
|
||||
|
||||
if type(a:func) != type('')
|
||||
if type(a:func) isnot v:t_string
|
||||
throw '''func'' must be a String'
|
||||
endif
|
||||
|
||||
if type(a:filetypes) != type([])
|
||||
if type(a:filetypes) isnot v:t_list
|
||||
throw '''filetypes'' must be a List'
|
||||
endif
|
||||
|
||||
for l:type in a:filetypes
|
||||
if type(l:type) != type('')
|
||||
if type(l:type) isnot v:t_string
|
||||
throw 'Each entry of ''filetypes'' must be a String'
|
||||
endif
|
||||
endfor
|
||||
|
||||
if type(a:desc) != type('')
|
||||
if type(a:desc) isnot v:t_string
|
||||
throw '''desc'' must be a String'
|
||||
endif
|
||||
|
||||
let l:aliases = get(a:000, 0, [])
|
||||
|
||||
if type(l:aliases) != type([])
|
||||
\|| !empty(filter(copy(l:aliases), 'type(v:val) != type('''')'))
|
||||
if type(l:aliases) isnot v:t_list
|
||||
\|| !empty(filter(copy(l:aliases), 'type(v:val) isnot v:t_string'))
|
||||
throw '''aliases'' must be a List of String values'
|
||||
endif
|
||||
|
||||
|
Reference in New Issue
Block a user