summaryrefslogtreecommitdiff
path: root/ale_linters/c/cppcheck.vim
blob: 754dad70e32e7021127bdfb76ed4e6db12913988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
" Author: Bart Libert <bart.libert@gmail.com>
" Description: cppcheck linter for c files

" Set this option to change the cppcheck options
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': 'cppcheck -q --language=c '
\       . g:ale_c_cppcheck_options
\       . ' %t',
\   'callback': 'ale#handlers#HandleCppCheckFormat',
\})