e149692cc9
subrepo: subdir: "dotfiles/.vim/plugged/ale" merged: "e4b205440" upstream: origin: "https://github.com/dense-analysis/ale.git" branch: "master" commit: "e4b205440" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
20 lines
637 B
VimL
20 lines
637 B
VimL
" Author: Justin Huang <justin.y.huang@live.com>
|
|
" Description: cpplint for c files
|
|
|
|
call ale#Set('c_cpplint_executable', 'cpplint')
|
|
call ale#Set('c_cpplint_options', '')
|
|
|
|
function! ale_linters#c#cpplint#GetCommand(buffer) abort
|
|
let l:options = ale#Var(a:buffer, 'c_cpplint_options')
|
|
|
|
return '%e' . ale#Pad(l:options) . ' %s'
|
|
endfunction
|
|
|
|
call ale#linter#Define('c', {
|
|
\ 'name': 'cpplint',
|
|
\ 'output_stream': 'stderr',
|
|
\ 'executable': {b -> ale#Var(b, 'c_cpplint_executable')},
|
|
\ 'command': function('ale_linters#c#cpplint#GetCommand'),
|
|
\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat',
|
|
\ 'lint_file': 1,
|
|
\})
|