Add support for actionlint options (#4216)

* Add support for actionlint options

* fix misaligned doc tags
This commit is contained in:
Isman Firmansyah
2022-05-29 20:23:47 +07:00
committed by GitHub
parent ae44f05600
commit 876140832c
4 changed files with 43 additions and 1 deletions

View File

@@ -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