This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/ale_linters/cpp/cpplint.vim
Wil Thomason 6ab92af181 Correctly pass options to cpplint (#728)
* Fix option passing to cpplint
2017-07-05 10:14:43 +01:00

19 lines
579 B
VimL

" 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
function! ale_linters#cpp#cpplint#GetCommand(buffer) abort
return 'cpplint ' . ale#Var(a:buffer, 'cpp_cpplint_options') . ' %s'
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'cpplint',
\ 'output_stream': 'stderr',
\ 'executable': 'cpplint',
\ 'command_callback': 'ale_linters#cpp#cpplint#GetCommand',
\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat',
\ 'lint_file': 1,
\})