summaryrefslogtreecommitdiff
path: root/ale_linters/vala/vala_lint.vim
diff options
context:
space:
mode:
authorAtsuya Takagi <asoftonight@gmail.com>2021-01-14 09:54:01 +0900
committerAtsuya Takagi <asoftonight@gmail.com>2021-01-23 00:08:01 +0900
commit8d5b3e827df3fa21de32cd367dca95b76f9b0199 (patch)
treedd65335d4890a91863131b27f5fd648cf9cbc1ab /ale_linters/vala/vala_lint.vim
parente3e1ddce9558ddad360f1109d48ff9c7c66e4e19 (diff)
downloadale-8d5b3e827df3fa21de32cd367dca95b76f9b0199.zip
decide whether or not to run with config file based on the presence of config filename value
Diffstat (limited to 'ale_linters/vala/vala_lint.vim')
-rw-r--r--ale_linters/vala/vala_lint.vim13
1 files changed, 5 insertions, 8 deletions
diff --git a/ale_linters/vala/vala_lint.vim b/ale_linters/vala/vala_lint.vim
index 39879303..4c39ba42 100644
--- a/ale_linters/vala/vala_lint.vim
+++ b/ale_linters/vala/vala_lint.vim
@@ -1,7 +1,6 @@
" Author: Atsuya Takagi <asoftonight@gmail.com>
" Description: A linter for Vala using Vala-Lint.
-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')
@@ -12,16 +11,14 @@ endfunction
function! ale_linters#vala#vala_lint#GetCommand(buffer) abort
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')
- let l:config_path = ale#path#FindNearestFile(a:buffer, l:config_filename)
+ let l:config_filename = ale#Var(a:buffer, 'vala_vala_lint_config_filename')
+ let l:config_path = ale#path#FindNearestFile(a:buffer, l:config_filename)
- if !empty(l:config_path)
- let l:command .= '-c ' . l:config_path . ' '
- endif
+ if !empty(l:config_path)
+ let l:command .= ' -c ' . l:config_path
endif
- return l:command . '%s'
+ return l:command . ' %s'
endfunction
function! ale_linters#vala#vala_lint#Handle(buffer, lines) abort