install.fairie/dotfiles/.vim/plugged/ale/test/handler/test_actionlint_handler.vader
Git E2E Dev Test Username e149692cc9 git subrepo clone https://github.com/dense-analysis/ale.git ./dotfiles/.vim/plugged/ale
subrepo:
  subdir:   "dotfiles/.vim/plugged/ale"
  merged:   "e4b205440"
upstream:
  origin:   "https://github.com/dense-analysis/ale.git"
  branch:   "master"
  commit:   "e4b205440"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
2022-10-18 10:37:09 -04:00

43 lines
1.4 KiB
Text

Before:
runtime! ale/handlers/actionlint.vim
After:
unlet! g:ale_yaml_actionlint_options
call ale#linter#Reset()
Execute(Problems should be parsed correctly for actionlint):
AssertEqual
\ [
\ {
\ 'lnum': 2,
\ 'col': 1,
\ 'type': 'E',
\ 'text': '"jobs" section is missing in workflow',
\ 'code': 'syntax-check',
\ },
\ {
\ 'lnum': 56,
\ 'col': 23,
\ 'type': 'E',
\ 'text': 'property "unknown_input" is not defined in object type {input7: bool; input0: any; input1: any; input2: string; input3: any; input4: any; input5: number; input6: number}',
\ 'code': 'expression',
\ },
\ ],
\ ale#handlers#actionlint#Handle(bufnr(''), [
\ '.codecov.yaml:2:1: "jobs" section is missing in workflow [syntax-check]',
\ 'workflow_call_event.yaml:56:23: property "unknown_input" is not defined in object type {input7: bool; input0: any; input1: any; input2: string; input3: any; input4: any; input5: number; input6: number} [expression]',
\ ])
Execute(Command should always have --no-color and --oneline options):
let g:ale_yaml_actionlint_options = ''
AssertEqual
\ '%e --no-color --oneline %t',
\ ale#handlers#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 %t',
\ ale#handlers#actionlint#GetCommand(bufnr(''))