find and use vala-lint config if exists
This commit is contained in:
parent
c15d9538cd
commit
280d2dedae
1 changed files with 8 additions and 1 deletions
|
@ -2,7 +2,14 @@
|
||||||
" Description: A linter for Vala using Vala-Lint.
|
" Description: A linter for Vala using Vala-Lint.
|
||||||
|
|
||||||
function! ale_linters#vala#vala_lint#GetCommand(buffer) abort
|
function! ale_linters#vala#vala_lint#GetCommand(buffer) abort
|
||||||
return 'io.elementary.vala-lint %s'
|
let l:command = 'io.elementary.vala-lint '
|
||||||
|
|
||||||
|
let l:config_path = ale#path#FindNearestFile(a:buffer, 'vala-lint.conf')
|
||||||
|
if !empty(l:config_path)
|
||||||
|
let l:command .= '-c ' . l:config_path . ' '
|
||||||
|
endif
|
||||||
|
|
||||||
|
return l:command . '%s'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale_linters#vala#vala_lint#Handle(buffer, lines) abort
|
function! ale_linters#vala#vala_lint#Handle(buffer, lines) abort
|
||||||
|
|
Reference in a new issue