health.vim: rename "suggestions" to "advice" in most places

This commit is contained in:
Justin M. Keyes 2017-10-15 12:00:44 +02:00
parent c4ab110e04
commit 2a5a6a0541
2 changed files with 9 additions and 9 deletions

View File

@ -96,21 +96,21 @@ endfunction
" Format a message for a specific report item
function! s:format_report_message(status, msg, ...) abort " {{{
let output = ' - ' . a:status . ': ' . s:indent_after_line1(a:msg, 4)
let suggestions = []
let advice = []
" Optional parameters
if a:0 > 0
let suggestions = type(a:1) == type("") ? [a:1] : a:1
if type(suggestions) != type([])
let advice = type(a:1) == type("") ? [a:1] : a:1
if type(advice) != type([])
throw "Expected String or List"
endif
endif
" Report each suggestion
if len(suggestions) > 0
if len(advice) > 0
let output .= "\n - ADVICE:"
endif
for suggestion in suggestions
for suggestion in advice
let output .= "\n - " . s:indent_after_line1(suggestion, 10)
endfor

View File

@ -64,11 +64,11 @@ health#report_info({msg}) *health#report_info*
health#report_ok({msg}) *health#report_ok*
Displays a "success" message.
health#report_warn({msg}, [{suggestions}]) *health#report_warn*
Displays a warning. {suggestions} is an optional List of suggestions.
health#report_warn({msg}, [{advice}]) *health#report_warn*
Displays a warning. {advice} is an optional List of suggestions.
health#report_error({msg}, [{suggestions}]) *health#report_error*
Displays an error. {suggestions} is an optional List of suggestions.
health#report_error({msg}, [{advice}]) *health#report_error*
Displays an error. {advice} is an optional List of suggestions.
health#{plugin}#check() *health.user_checker*
This is the form of a healthcheck definition. Call the above functions