summaryrefslogtreecommitdiff
path: root/ale_linters/vala/vala_lint.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/vala/vala_lint.vim')
-rw-r--r--ale_linters/vala/vala_lint.vim9
1 files changed, 6 insertions, 3 deletions
diff --git a/ale_linters/vala/vala_lint.vim b/ale_linters/vala/vala_lint.vim
index b53e9b86..a38bf9bf 100644
--- a/ale_linters/vala/vala_lint.vim
+++ b/ale_linters/vala/vala_lint.vim
@@ -13,7 +13,7 @@ function! ale_linters#vala#vala_lint#GetCommand(buffer) abort
endfunction
function! ale_linters#vala#vala_lint#Handle(buffer, lines) abort
- let l:pattern = '^\s*\(\d\+\)\.\(\d\+\)\s\+\(\w\+\)\s\+\(.\+\)\s\([A-Za-z0-9_\-]\+\)'
+ let l:pattern = '^\s*\(\d\+\)\.\(\d\+\)\s\+\(error\|warn\)\s\+\(.\+\)\s\([A-Za-z0-9_\-]\+\)'
let l:output = []
for l:line in a:lines
@@ -26,10 +26,13 @@ function! ale_linters#vala#vala_lint#Handle(buffer, lines) abort
continue
endif
+ let l:refined_type = l:match[3] is# 'warn' ? 'W' : 'E'
+ let l:cleaned_text = substitute(l:match[4], '^\s*\(.\{-}\)\s*$', '\1', '')
+
let l:lnum = l:match[1] + 0
let l:column = l:match[2] + 0
- let l:type = 'E'
- let l:text = substitute(l:match[4], '^\s*\(.\{-}\)\s*$', '\1', '')
+ let l:type = l:refined_type
+ let l:text = l:cleaned_text
let l:code = l:match[5]
call add(l:output, {