summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorjD91mZM2 <me@krake.one>2021-02-06 11:06:08 +0100
committerjD91mZM2 <me@krake.one>2021-02-06 11:12:04 +0100
commit27130efc655dcba17c84cd4f8d30b6985c574441 (patch)
tree44280561f3529229aee8d8de0368733e43cbe814 /ale_linters
parent98caa19cc76ee1d98121b3dbe9158374cf00f2d7 (diff)
downloadale-27130efc655dcba17c84cd4f8d30b6985c574441.zip
Reuse ale#fixers#jq#GetExecutable for jq
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/json/jq.vim6
1 files changed, 2 insertions, 4 deletions
diff --git a/ale_linters/json/jq.vim b/ale_linters/json/jq.vim
index 777b65c6..dd6ed0a6 100644
--- a/ale_linters/json/jq.vim
+++ b/ale_linters/json/jq.vim
@@ -1,9 +1,7 @@
" Author: jD91mZM2 <me@krake.one>
-call ale#Set('json_jq_executable', 'jq')
-
function! ale_linters#json#jq#GetCommand(buffer) abort
- let l:executable = ale#Var(a:buffer, 'json_jq_executable')
+ let l:executable = ale#fixers#jq#GetExecutable(a:buffer)
return ale#Escape(l:executable)
endfunction
@@ -27,7 +25,7 @@ endfunction
call ale#linter#Define('json', {
\ 'name': 'jq',
-\ 'executable': { b -> ale#Var(b, 'json_jq_executable') },
+\ 'executable': function('ale#fixers#jq#GetExecutable'),
\ 'output_stream': 'stderr',
\ 'command': function('ale_linters#json#jq#GetCommand'),
\ 'callback': 'ale_linters#json#jq#Handle',