summaryrefslogtreecommitdiff
path: root/ale_linters/vala
diff options
context:
space:
mode:
authorAtsuya Takagi <asoftonight@gmail.com>2021-01-14 09:52:36 +0900
committerAtsuya Takagi <asoftonight@gmail.com>2021-01-23 00:08:01 +0900
commite3e1ddce9558ddad360f1109d48ff9c7c66e4e19 (patch)
tree70636d32780f472c74e3c801b832cc0780715920 /ale_linters/vala
parent4328fe7dca248266a5cbaa0546581f37d0cf4c64 (diff)
downloadale-e3e1ddce9558ddad360f1109d48ff9c7c66e4e19.zip
allow setting vala-lint executable
Diffstat (limited to 'ale_linters/vala')
-rw-r--r--ale_linters/vala/vala_lint.vim9
1 files changed, 7 insertions, 2 deletions
diff --git a/ale_linters/vala/vala_lint.vim b/ale_linters/vala/vala_lint.vim
index 45e9b7d8..39879303 100644
--- a/ale_linters/vala/vala_lint.vim
+++ b/ale_linters/vala/vala_lint.vim
@@ -3,9 +3,14 @@
call ale#Set('vala_vala_lint_enable_config', 0)
call ale#Set('vala_vala_lint_config_filename', 'vala-lint.conf')
+call ale#Set('vala_vala_lint_executable', 'io.elementary.vala-lint')
+
+function! ale_linters#vala#vala_lint#GetExecutable(buffer) abort
+ return ale#Var(a:buffer, 'vala_vala_lint_executable')
+endfunction
function! ale_linters#vala#vala_lint#GetCommand(buffer) abort
- let l:command = 'io.elementary.vala-lint '
+ let l:command = ale_linters#vala#vala_lint#GetExecutable(a:buffer)
if ale#Var(a:buffer, 'vala_vala_lint_enable_config')
let l:config_filename = ale#Var(a:buffer, 'vala_vala_lint_config_filename')
@@ -57,7 +62,7 @@ endfunction
call ale#linter#Define('vala', {
\ 'name': 'vala-lint',
\ 'output_stream': 'stdout',
-\ 'executable': 'io.elementary.vala-lint',
+\ 'executable': function('ale_linters#vala#vala_lint#GetExecutable'),
\ 'command': function('ale_linters#vala#vala_lint#GetCommand'),
\ 'callback': 'ale_linters#vala#vala_lint#Handle',
\ 'lint_file': 1,