fix(hadolint): set code field as well (#3943)

This commit is contained in:
infokiller
2021-10-19 09:30:19 +03:00
committed by GitHub
parent 16898417e6
commit cb0f0e1d0b
3 changed files with 13 additions and 4 deletions

View File

@@ -55,13 +55,19 @@ function! ale_linters#dockerfile#hadolint#Handle(buffer, lines) abort
let l:detail = 'hadolint could not parse the file because of a syntax error.'
endif
call add(l:output, {
let l:line_output = {
\ 'lnum': l:lnum,
\ 'col': l:colnum,
\ 'type': l:type,
\ 'text': l:text,
\ 'detail': l:detail
\})
\}
if l:code isnot# ''
let l:line_output['code'] = l:code
endif
call add(l:output, l:line_output)
endfor
return l:output