mirror of
https://github.com/dense-analysis/ale
synced 2024-12-27 00:22:28 +00:00
3ca66e44bd
* Add cppcheck handler match on misra msg * Add linebreak to checkmake formatter Co-authored-by: Dan George <dgeorge@anduril.com>
26 lines
723 B
VimL
26 lines
723 B
VimL
" 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
|
|
|
|
return l:output
|
|
endfunction
|
|
|
|
call ale#linter#Define('make', {
|
|
\ 'name': 'checkmake',
|
|
\ 'executable': 'checkmake',
|
|
\ 'command': 'checkmake %s --format="{{.LineNumber}}:{{.Rule}}:{{.Violation}}{{\"\r\n\"}}"',
|
|
\ 'callback': 'ale_linters#make#checkmake#Handle',
|
|
\})
|