summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorAtsuya Takagi <asoftonight@gmail.com>2021-01-04 15:49:29 +0900
committerAtsuya Takagi <asoftonight@gmail.com>2021-01-23 00:08:01 +0900
commit280d2dedaeba09aad139e9b2c6ea37e3213083b4 (patch)
tree70437266f63b065770d5c0abb199491563a27798 /ale_linters
parentc15d9538cda6ac4bc7cd258b2a0a271ed22ac350 (diff)
downloadale-280d2dedaeba09aad139e9b2c6ea37e3213083b4.zip
find and use vala-lint config if exists
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/vala/vala_lint.vim9
1 files changed, 8 insertions, 1 deletions
diff --git a/ale_linters/vala/vala_lint.vim b/ale_linters/vala/vala_lint.vim
index b0c86fcc..b53e9b86 100644
--- a/ale_linters/vala/vala_lint.vim
+++ b/ale_linters/vala/vala_lint.vim
@@ -2,7 +2,14 @@
" Description: A linter for Vala using Vala-Lint.
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
function! ale_linters#vala#vala_lint#Handle(buffer, lines) abort