summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/handlers/actionlint.vim14
1 files changed, 13 insertions, 1 deletions
diff --git a/autoload/ale/handlers/actionlint.vim b/autoload/ale/handlers/actionlint.vim
index 9a6f1909..73843c08 100644
--- a/autoload/ale/handlers/actionlint.vim
+++ b/autoload/ale/handlers/actionlint.vim
@@ -1,5 +1,17 @@
function! ale#handlers#actionlint#GetCommand(buffer) abort
- return '%e --no-color --oneline %t'
+ let l:options = ale#Var(a:buffer, 'yaml_actionlint_options')
+
+ " automatically add --no-color option if not defined
+ if l:options !~# '--no-color'
+ let l:options .= ' --no-color'
+ endif
+
+ " automatically add --oneline option if not defined
+ if l:options !~# '--oneline'
+ let l:options .= ' --oneline'
+ endif
+
+ return '%e ' . l:options . ' %t'
endfunction
function! ale#handlers#actionlint#Handle(buffer, lines) abort