1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-10 13:45:48 +08:00
SpaceVim/autoload/SpaceVim/health.vim
Wang Shidong 3ccd4e4680
update file head (#1407)
* update file head

Update file head

* Update file head

* Update file head
2018-02-19 22:07:04 +08:00

29 lines
935 B
VimL

"=============================================================================
" health.vim --- SpaceVim health checker
" Copyright (c) 2016-2017 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg at 163.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
function! SpaceVim#health#report() abort
let items = map(SpaceVim#util#globpath(&rtp,'autoload/SpaceVim/health/*'), "fnamemodify(v:val,':t:r')")
let report = []
for item in items
try
let result = SpaceVim#health#{item}#check()
call extend(report,result)
catch /^Vim\%((\a\+)\)\=:E117/
call extend(report,[
\ '',
\ 'SpaceVim Health Error:',
\ ' There is no function: SpaceVim#health#' . item . '#check()',
\ '',
\ ])
endtry
endfor
return join(report, "\n")
endfunction
" vim:set et sw=2: