summaryrefslogtreecommitdiff
path: root/ale_linters/cpp/cpplint.vim
diff options
context:
space:
mode:
authorWil Thomason <wbthomason@users.noreply.github.com>2017-07-05 05:14:43 -0400
committerw0rp <w0rp@users.noreply.github.com>2017-07-05 10:14:43 +0100
commit6ab92af181ac8b26a7c0936438853cb6ac97c792 (patch)
tree2fc1a9ef62c5fe053083696fe7c2593f0b06e567 /ale_linters/cpp/cpplint.vim
parent18fef18ab1da0fb54a0d5a267a0002c0745de5bf (diff)
downloadale-6ab92af181ac8b26a7c0936438853cb6ac97c792.zip
Correctly pass options to cpplint (#728)
* Fix option passing to cpplint
Diffstat (limited to 'ale_linters/cpp/cpplint.vim')
-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,
\})