summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Carry <tim@pixelastic.com>2024-02-06 02:23:26 +0100
committerGitHub <noreply@github.com>2024-02-06 10:23:26 +0900
commit6fd9f3c54f80cec8be364594246daf9ac41cbe3e (patch)
tree6d7cad7b1fe97bbf9719d7016d55d399a63fdef0
parent1b24bd3f5fc37a8c30d9be9d9dc8576aea53657b (diff)
downloadale-6fd9f3c54f80cec8be364594246daf9ac41cbe3e.zip
fix #4687 - only lint one file with actionlint (#4688)
-rw-r--r--ale_linters/yaml/actionlint.vim2
-rw-r--r--test/linter/test_yaml_actionlint.vader6
2 files changed, 4 insertions, 4 deletions
diff --git a/ale_linters/yaml/actionlint.vim b/ale_linters/yaml/actionlint.vim
index 0984defb..20455765 100644
--- a/ale_linters/yaml/actionlint.vim
+++ b/ale_linters/yaml/actionlint.vim
@@ -15,7 +15,7 @@ function! ale_linters#yaml#actionlint#GetCommand(buffer) abort
let l:options .= ale#Pad('-oneline')
endif
- return '%e' . ale#Pad(l:options)
+ return '%e' . ale#Pad(l:options) . ' - '
endfunction
function! ale_linters#yaml#actionlint#Handle(buffer, lines) abort
diff --git a/test/linter/test_yaml_actionlint.vader b/test/linter/test_yaml_actionlint.vader
index 707f9cae..d9970cf5 100644
--- a/test/linter/test_yaml_actionlint.vader
+++ b/test/linter/test_yaml_actionlint.vader
@@ -42,16 +42,16 @@ Execute(Shellcheck issues should be reported at the line they appear):
\ 'validate.yml:19:9: shellcheck reported issue in this script: SC2086:info:1:15: Double quote to prevent globbing and word splitting [shellcheck]'
\ ])
-Execute(Command should always have -no-color and -oneline options):
+Execute(Command should always have -no-color, -oneline and - options):
let g:ale_yaml_actionlint_options = ''
AssertEqual
- \ '%e -no-color -oneline',
+ \ '%e -no-color -oneline - ',
\ ale_linters#yaml#actionlint#GetCommand(bufnr(''))
Execute(Options should be added to command):
let g:ale_yaml_actionlint_options = '-shellcheck= -pyflakes='
AssertEqual
- \ '%e -shellcheck= -pyflakes= -no-color -oneline',
+ \ '%e -shellcheck= -pyflakes= -no-color -oneline - ',
\ ale_linters#yaml#actionlint#GetCommand(bufnr(''))