diff options
author | Bartek thindil Jasicki <thindil@laeran.pl> | 2020-07-02 10:11:30 +0200 |
---|---|---|
committer | Bartek thindil Jasicki <thindil@laeran.pl> | 2020-07-02 10:11:30 +0200 |
commit | 0f45d3d01d2f91d5b9ce3f01de6c288c6f2ca441 (patch) | |
tree | 675851401f8b15866ee8e3b190cfc0159a47bdde /ale_linters | |
parent | a5e7f2c8bb61f3e882bc26ce1773b130d1fbc32b (diff) | |
parent | b3c6db173a019c37c83d4600c0c68872e91086dd (diff) | |
download | ale-0f45d3d01d2f91d5b9ce3f01de6c288c6f2ca441.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/dockerfile/dockerfile_lint.vim | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ale_linters/dockerfile/dockerfile_lint.vim b/ale_linters/dockerfile/dockerfile_lint.vim index 95768b12..0c0ad533 100644 --- a/ale_linters/dockerfile/dockerfile_lint.vim +++ b/ale_linters/dockerfile/dockerfile_lint.vim @@ -32,14 +32,29 @@ function! ale_linters#dockerfile#dockerfile_lint#Handle(buffer, lines) abort let l:line = get(l:object, 'line', -1) let l:message = l:object['message'] + let l:link = get(l:object, 'reference_url', '') + + if type(l:link) == v:t_list + " Somehow, reference_url is returned as two-part list. + " Anchor markers in that list are sometimes duplicated. + " See https://github.com/projectatomic/dockerfile_lint/issues/134 + let l:link = join(l:link, '') + let l:link = substitute(l:link, '##', '#', '') + endif + + let l:detail = l:message + if get(l:object, 'description', 'None') isnot# 'None' - let l:message = l:message . '. ' . l:object['description'] + let l:detail .= "\n\n" . l:object['description'] endif + let l:detail .= "\n\n" . l:link + call add(l:messages, { \ 'lnum': l:line, \ 'text': l:message, \ 'type': ale_linters#dockerfile#dockerfile_lint#GetType(l:type), + \ 'detail': l:detail, \}) endfor endfor |