summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ale_linters/cpp/cpplint.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/ale_linters/cpp/cpplint.vim b/ale_linters/cpp/cpplint.vim
index 0f43996b..205c7468 100644
--- a/ale_linters/cpp/cpplint.vim
+++ b/ale_linters/cpp/cpplint.vim
@@ -5,11 +5,15 @@ 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': 'cpplint %s',
+\ 'command_callback': 'ale_linters#cpp#cpplint#GetCommand',
\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat',
\ 'lint_file': 1,
\})