mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Fix linting with jq (#4765) (#4862)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--neovim-06-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--neovim-06-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
With the 1.6 version of jq the error message start with "parse error". With the last version of jq the error message start with "jq: parse error". Fix it by using a regular expression that works in both cases.
This commit is contained in:
@@ -5,7 +5,7 @@ call ale#Set('json_jq_filters', '.')
|
||||
|
||||
" Matches patterns like the following:
|
||||
" parse error: Expected another key-value pair at line 4, column 3
|
||||
let s:pattern = '^parse error: \(.\+\) at line \(\d\+\), column \(\d\+\)$'
|
||||
let s:pattern = 'parse error: \(.\+\) at line \(\d\+\), column \(\d\+\)$'
|
||||
|
||||
function! ale_linters#json#jq#Handle(buffer, lines) abort
|
||||
return ale#util#MapMatches(a:lines, s:pattern, {match -> {
|
||||
|
||||
Reference in New Issue
Block a user