diff options
author | w0rp <devw0rp@gmail.com> | 2017-10-24 22:45:30 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-10-24 22:45:30 +0100 |
commit | 1a5ef969a528c037b865828dedcd482a51d0e004 (patch) | |
tree | ccc0ce9f1537df3bbf36a38463a8b84d1aeb3c4d /ale_linters | |
parent | 1c56bebd7ca44d43badc9a63dd7dc4d88fd1b8b9 (diff) | |
parent | d644dc797f74e446c3301292107ffaf6ed9a6121 (diff) | |
download | ale-1a5ef969a528c037b865828dedcd482a51d0e004.zip |
Merge branch 'aurieh-master'
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/make/checkmake.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ale_linters/make/checkmake.vim b/ale_linters/make/checkmake.vim new file mode 100644 index 00000000..3dd8cc91 --- /dev/null +++ b/ale_linters/make/checkmake.vim @@ -0,0 +1,24 @@ +" 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) + let l:text = l:match[2] . ': ' . l:match[3] + call add(l:output, { + \ 'bufnr': a:buffer, + \ 'lnum': l:match[1] + 0, + \ 'type': 'E', + \ 'text': l:text, + \}) + endfor + return l:output +endfunction + +call ale#linter#Define('make', { +\ 'name': 'checkmake', +\ 'executable': 'checkmake', +\ 'command': 'checkmake %s --format="{{.LineNumber}}:{{.Rule}}:{{.Violation}}"', +\ 'callback': 'ale_linters#make#checkmake#Handle', +\}) |