summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ale_linters/ruby/reek.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/ale_linters/ruby/reek.vim b/ale_linters/ruby/reek.vim
index 226b452e..b6fa9d76 100644
--- a/ale_linters/ruby/reek.vim
+++ b/ale_linters/ruby/reek.vim
@@ -19,6 +19,10 @@ function! ale_linters#ruby#reek#GetCommand(buffer, version) abort
\ . l:display_name_args
endfunction
+function! s:GetDocumentationLink(error) abort
+ return get(a:error, 'documentation_link', get(a:error, 'wiki_link', ''))
+endfunction
+
function! s:BuildText(buffer, error) abort
let l:parts = []
@@ -29,7 +33,7 @@ function! s:BuildText(buffer, error) abort
call add(l:parts, a:error.message)
if ale#Var(a:buffer, 'ruby_reek_show_wiki_link')
- call add(l:parts, '[' . a:error.wiki_link . ']')
+ call add(l:parts, '[' . s:GetDocumentationLink(a:error) . ']')
endif
return join(l:parts, ' ')