test my hypotethis
This commit is contained in:
parent
7f1dd5f66a
commit
e94d23b1d9
1 changed files with 26 additions and 18 deletions
|
@ -9,27 +9,35 @@ 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\+\(\w\+\)\s\+\(.\+\)\s\([A-Za-z0-9_\-]\+\)'
|
||||||
let l:output = []
|
let l:output = []
|
||||||
|
|
||||||
for l:line in a:lines
|
call add(l:output, {
|
||||||
let l:match = matchlist(l:line, l:pattern)
|
\ 'lnum': 12,
|
||||||
|
\ 'col': 30,
|
||||||
|
\ 'text': 'bad',
|
||||||
|
\ 'type': 'E',
|
||||||
|
\ 'code': 'testcode',
|
||||||
|
\})
|
||||||
|
|
||||||
if len(l:match) == 0
|
"for l:line in a:lines
|
||||||
continue
|
" let l:match = matchlist(l:line, l:pattern)
|
||||||
endif
|
|
||||||
|
|
||||||
let l:line = l:match[1] + 0
|
" if len(l:match) == 0
|
||||||
let l:column = l:match[2] + 0
|
" continue
|
||||||
let l:type = 'E'
|
" endif
|
||||||
let l:text = substitute(l:match[4], '^\s*\(.\{-}\)\s*$', '\1', '')
|
|
||||||
let l:code = l:match[5]
|
|
||||||
|
|
||||||
call add(l:output, {
|
" let l:line = l:match[1] + 0
|
||||||
\ 'lnum': l:line,
|
" let l:column = l:match[2] + 0
|
||||||
\ 'col': l:column,
|
" let l:type = 'E'
|
||||||
\ 'text': l:text,
|
" let l:text = substitute(l:match[4], '^\s*\(.\{-}\)\s*$', '\1', '')
|
||||||
\ 'type': l:type,
|
" let l:code = l:match[5]
|
||||||
\ 'code': l:code,
|
|
||||||
\})
|
" call add(l:output, {
|
||||||
endfor
|
" \ 'lnum': l:line,
|
||||||
|
" \ 'col': l:column,
|
||||||
|
" \ 'text': l:text,
|
||||||
|
" \ 'type': l:type,
|
||||||
|
" \ 'code': l:code,
|
||||||
|
" \})
|
||||||
|
"endfor
|
||||||
|
|
||||||
return l:output
|
return l:output
|
||||||
endfunction
|
endfunction
|
||||||
|
|
Reference in a new issue