summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorinfokiller <infokiller@users.noreply.github.com>2021-10-19 09:30:19 +0300
committerGitHub <noreply@github.com>2021-10-19 15:30:19 +0900
commitcb0f0e1d0b2b189fbfb32b8ccbbc5efbed2cd7f0 (patch)
treec5934877df0acd1186a662d743baa3cdf2c5b517 /ale_linters
parent16898417e68ffb6034b2a6de0c1b25502bd846d8 (diff)
downloadale-cb0f0e1d0b2b189fbfb32b8ccbbc5efbed2cd7f0.zip
fix(hadolint): set code field as well (#3943)
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/dockerfile/hadolint.vim10
1 files changed, 8 insertions, 2 deletions
diff --git a/ale_linters/dockerfile/hadolint.vim b/ale_linters/dockerfile/hadolint.vim
index 45b03aed..278e9466 100644
--- a/ale_linters/dockerfile/hadolint.vim
+++ b/ale_linters/dockerfile/hadolint.vim
@@ -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