Skip to content

Commit

Permalink
fix #4687 - only lint one file with actionlint
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelastic committed Jan 24, 2024
1 parent 8922478 commit 5d5ec87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ale_linters/yaml/actionlint.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/linter/test_yaml_actionlint.vader
Original file line number Diff line number Diff line change
Expand Up @@ -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(''))

0 comments on commit 5d5ec87

Please sign in to comment.