1
0
Fork 0
mirror of synced 2024-11-15 13:38:58 -05:00
ultimate-vim/sources_non_forked/ale/ale_linters/make/checkmake.vim

26 lines
723 B
VimL
Raw Normal View History

" Author: aurieh - https://github.com/aurieh
function! ale_linters#make#checkmake#Handle(buffer, lines) abort
let l:pattern = '\v^(\d+):(.+):(.+)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'bufnr': a:buffer,
\ 'lnum': l:match[1] + 0,
\ 'type': 'E',
\ 'code': l:match[2],
\ 'text': l:match[3],
\})
endfor
2018-09-24 20:40:17 -04:00
return l:output
endfunction
call ale#linter#Define('make', {
\ 'name': 'checkmake',
\ 'executable': 'checkmake',
2022-05-19 09:16:38 -04:00
\ 'command': 'checkmake %s --format="{{.LineNumber}}:{{.Rule}}:{{.Violation}}{{\"\r\n\"}}"',
\ 'callback': 'ale_linters#make#checkmake#Handle',
\})