mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-09 13:02:28 +08:00
Merge pull request #3568 from jD91mZM2/jq
Add jq linter for JSON diagnostics
This commit is contained in:
8
test/command_callback/test_jq_command_callback.vader
Normal file
8
test/command_callback/test_jq_command_callback.vader
Normal file
@@ -0,0 +1,8 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('json', 'jq')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The default command should be correct):
|
||||
AssertLinter 'jq', ale#Escape('jq')
|
||||
18
test/test_jq_linter.vader
Normal file
18
test/test_jq_linter.vader
Normal file
@@ -0,0 +1,18 @@
|
||||
Before:
|
||||
runtime ale_linters/json/jq.vim
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute (Should parse error correctly):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 1,
|
||||
\ 'col': 9,
|
||||
\ 'text': 'Expected another array element',
|
||||
\ }
|
||||
\ ],
|
||||
\ ale_linters#json#jq#Handle(0, [
|
||||
\ 'parse error: Expected another array element at line 1, column 9'
|
||||
\ ])
|
||||
Reference in New Issue
Block a user