ale/test/handler/test_hurlfmt_handler.vader
Horacio Sanson 8f9197b79b
Fix 4740 - add hurlfmt linter (#4741)
* Fix 4740 - add hurlfmt linter

* Fix 4740 - add hurlfmt fixer

* Fix wrong comments

* Add end_col to qflist

* Fix test
2024-03-12 09:51:49 +09:00

30 lines
720 B
Plaintext

Before:
runtime ale_linters/hurl/hurlfmt.vim
After:
call ale#linter#Reset()
Execute(The hurlfmt handler should parse lines correctly):
AssertEqual
\ [
\ {
\ 'lnum': 11,
\ 'bufnr': 345,
\ 'col': 48,
\ 'end_col': 48,
\ 'text': 'Parsing space : expecting a space ',
\ 'type': 'E',
\ },
\ ],
\ ale_linters#hurl#hurlfmt#HandleOutput(345, [
\ 'error: Parsing space',
\ '--> test.hurl:11:48',
\ ' |',
\ '8 " | header "Content-Type"= "application/json; charset=utf-8"',
\ ' | ^ expecting a space',
\ ' |',
\ ])
Execute(The rubocop handler should handle empty output):
AssertEqual [], ale_linters#hurl#hurlfmt#HandleOutput(347, [])