From 8d5b3e827df3fa21de32cd367dca95b76f9b0199 Mon Sep 17 00:00:00 2001 From: Atsuya Takagi Date: Thu, 14 Jan 2021 09:54:01 +0900 Subject: decide whether or not to run with config file based on the presence of config filename value --- ale_linters/vala/vala_lint.vim | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'ale_linters/vala/vala_lint.vim') 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 " 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 -- cgit v1.2.3