summaryrefslogtreecommitdiff
path: root/ale_linters/c/cppcheck.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/c/cppcheck.vim')
-rw-r--r--ale_linters/c/cppcheck.vim9
1 files changed, 4 insertions, 5 deletions
diff --git a/ale_linters/c/cppcheck.vim b/ale_linters/c/cppcheck.vim
index d4362cc0..754dad70 100644
--- a/ale_linters/c/cppcheck.vim
+++ b/ale_linters/c/cppcheck.vim
@@ -2,15 +2,14 @@
" Description: cppcheck linter for c files
" Set this option to change the cppcheck options
-if !exists('g:ale_c_cppcheck_options')
- let g:ale_c_cppcheck_options = '--enable=style'
-endif
+let g:ale_c_cppcheck_options = get(g:, 'ale_c_cppcheck_options', '--enable=style')
call ale#linter#Define('c', {
\ 'name': 'cppcheck',
\ 'output_stream': 'both',
\ 'executable': 'cppcheck',
-\ 'command': g:ale#util#stdin_wrapper . ' .c cppcheck -q --language=c '
-\ . g:ale_c_cppcheck_options,
+\ 'command': 'cppcheck -q --language=c '
+\ . g:ale_c_cppcheck_options
+\ . ' %t',
\ 'callback': 'ale#handlers#HandleCppCheckFormat',
\})