summaryrefslogtreecommitdiff
path: root/ale_linters/cpp/cpplint.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/cpp/cpplint.vim')
-rw-r--r--ale_linters/cpp/cpplint.vim10
1 files changed, 2 insertions, 8 deletions
diff --git a/ale_linters/cpp/cpplint.vim b/ale_linters/cpp/cpplint.vim
index 346ac815..d135fa79 100644
--- a/ale_linters/cpp/cpplint.vim
+++ b/ale_linters/cpp/cpplint.vim
@@ -4,22 +4,16 @@
call ale#Set('cpp_cpplint_executable', 'cpplint')
call ale#Set('cpp_cpplint_options', '')
-function! ale_linters#cpp#cpplint#GetExecutable(buffer) abort
- return ale#Var(a:buffer, 'cpp_cpplint_executable')
-endfunction
-
function! ale_linters#cpp#cpplint#GetCommand(buffer) abort
let l:options = ale#Var(a:buffer, 'cpp_cpplint_options')
- return ale#Escape(ale_linters#cpp#cpplint#GetExecutable(a:buffer))
- \ . (!empty(l:options) ? ' ' . l:options : '')
- \ . ' %s'
+ return '%e' . ale#Pad(l:options) . ' %s'
endfunction
call ale#linter#Define('cpp', {
\ 'name': 'cpplint',
\ 'output_stream': 'stderr',
-\ 'executable_callback': 'ale_linters#cpp#cpplint#GetExecutable',
+\ 'executable_callback': ale#VarFunc('cpp_cpplint_executable'),
\ 'command_callback': 'ale_linters#cpp#cpplint#GetCommand',
\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat',
\ 'lint_file': 1,