diff options
author | Isman Firmansyah <iromli@users.noreply.github.com> | 2022-05-29 20:23:47 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-29 22:23:47 +0900 |
commit | 876140832cd33e0566c5a30a755939e088925e66 (patch) | |
tree | 0eb48701e19b1c741ba19eb267f5afe6a38c408d /autoload | |
parent | ae44f0560031d4e7c1c806247efb8797cb54dc0e (diff) | |
download | ale-876140832cd33e0566c5a30a755939e088925e66.zip |
Add support for actionlint options (#4216)
* Add support for actionlint options
* fix misaligned doc tags
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/handlers/actionlint.vim | 14 |
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 |