2017-05-10 13:41:58 -04:00
|
|
|
" Author: Dawid Kurek https://github.com/dawikur
|
|
|
|
" Description: cpplint for cpp files
|
|
|
|
|
|
|
|
if !exists('g:ale_cpp_cpplint_options')
|
|
|
|
let g:ale_cpp_cpplint_options = ''
|
|
|
|
endif
|
|
|
|
|
2017-07-05 05:14:43 -04:00
|
|
|
function! ale_linters#cpp#cpplint#GetCommand(buffer) abort
|
|
|
|
return 'cpplint ' . ale#Var(a:buffer, 'cpp_cpplint_options') . ' %s'
|
|
|
|
endfunction
|
|
|
|
|
2017-05-10 13:41:58 -04:00
|
|
|
call ale#linter#Define('cpp', {
|
|
|
|
\ 'name': 'cpplint',
|
|
|
|
\ 'output_stream': 'stderr',
|
|
|
|
\ 'executable': 'cpplint',
|
2017-07-05 05:14:43 -04:00
|
|
|
\ 'command_callback': 'ale_linters#cpp#cpplint#GetCommand',
|
2017-05-10 13:41:58 -04:00
|
|
|
\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat',
|
|
|
|
\ 'lint_file': 1,
|
|
|
|
\})
|