Correctly pass options to cpplint (#728)
* Fix option passing to cpplint
This commit is contained in:
parent
18fef18ab1
commit
6ab92af181
@ -5,11 +5,15 @@ if !exists('g:ale_cpp_cpplint_options')
|
|||||||
let g:ale_cpp_cpplint_options = ''
|
let g:ale_cpp_cpplint_options = ''
|
||||||
endif
|
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', {
|
call ale#linter#Define('cpp', {
|
||||||
\ 'name': 'cpplint',
|
\ 'name': 'cpplint',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable': 'cpplint',
|
\ 'executable': 'cpplint',
|
||||||
\ 'command': 'cpplint %s',
|
\ 'command_callback': 'ale_linters#cpp#cpplint#GetCommand',
|
||||||
\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat',
|
\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
Loading…
Reference in New Issue
Block a user