mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-27 22:41:10 +08:00
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
This commit is contained in:
29
test/handler/test_hurlfmt_handler.vader
Normal file
29
test/handler/test_hurlfmt_handler.vader
Normal file
@@ -0,0 +1,29 @@
|
||||
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, [])
|
||||
Reference in New Issue
Block a user