install.fairie/dotfiles/.vim/plugged/ale/test/handler/test_puglint_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

45 lines
1.2 KiB
Text

Before:
runtime ale_linters/pug/puglint.vim
After:
call ale#linter#Reset()
Execute(Regular errors should be handled):
AssertEqual
\ [
\ {
\ 'lnum': 1,
\ 'col': 5,
\ 'type': 'E',
\ 'text': 'Static attribute "class" must be written as class literal',
\ },
\ ],
\ ale_linters#pug#puglint#Handle(0, [
\ '/tmp/vwYwsJA/233/test.pug:1:5 Static attribute "class" must be written as class literal',
\ ])
Execute(syntax errors in the configuration file should be handled):
AssertEqual
\ [
\ {
\ 'lnum': 1,
\ 'text': 'puglint configuration error (type :ALEDetail for more information)',
\ 'detail': join(
\ [
\ 'undefined:2',
\ ' disallowClassAttributeWithStaticValue: true',
\ ' ^',
\ 'SyntaxError: Unexpected token d in JSON at position 4',
\ ' at JSON.parse (<anonymous>)',
\ ],
\ "\n"
\ ),
\ },
\ ],
\ ale_linters#pug#puglint#Handle(0, [
\ 'undefined:2',
\ ' disallowClassAttributeWithStaticValue: true',
\ ' ^',
\ 'SyntaxError: Unexpected token d in JSON at position 4',
\ ' at JSON.parse (<anonymous>)',
\ ])