summaryrefslogtreecommitdiff
path: root/ale_linters/dockerfile/hadolint.vim
diff options
context:
space:
mode:
authorMatthew Armand <marmand68@gmail.com>2022-11-04 04:07:56 -0400
committerGitHub <noreply@github.com>2022-11-04 17:07:56 +0900
commit121fbefeaef165191820aa72858228921bee4416 (patch)
tree6c9c38cd2a2d759612f0dfb2cac305816724000a /ale_linters/dockerfile/hadolint.vim
parent483d056528543df3349299db1ecf4aecfd0d7f44 (diff)
downloadale-121fbefeaef165191820aa72858228921bee4416.zip
Add 'dockerfile_hadolint_options' config setting (#4353)
- Add this option so command line arguments can be supplied to hadolint - This will be respected when running in docker and via the executable - Preserve the --no-color and - flags, and add these to the list - Add to docs and tests
Diffstat (limited to 'ale_linters/dockerfile/hadolint.vim')
-rw-r--r--ale_linters/dockerfile/hadolint.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/ale_linters/dockerfile/hadolint.vim b/ale_linters/dockerfile/hadolint.vim
index 278e9466..9a6a6258 100644
--- a/ale_linters/dockerfile/hadolint.vim
+++ b/ale_linters/dockerfile/hadolint.vim
@@ -3,6 +3,7 @@
" always, yes, never
call ale#Set('dockerfile_hadolint_use_docker', 'never')
call ale#Set('dockerfile_hadolint_docker_image', 'hadolint/hadolint')
+call ale#Set('dockerfile_hadolint_options', '')
function! ale_linters#dockerfile#hadolint#Handle(buffer, lines) abort
" Matches patterns line the following:
@@ -102,7 +103,7 @@ endfunction
function! ale_linters#dockerfile#hadolint#GetCommand(buffer) abort
let l:command = ale_linters#dockerfile#hadolint#GetExecutable(a:buffer)
- let l:opts = '--no-color -'
+ let l:opts = ale#Var(a:buffer, 'dockerfile_hadolint_options') . ' --no-color -'
if l:command is# 'docker'
return printf('docker run --rm -i %s hadolint %s',