summaryrefslogtreecommitdiff
path: root/ale_linters/cpp/cppcheck.vim
blob: b28771581086051cd0b5f1e87be9e2b66a8bf8a0 (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 cpp files

" Set this option to change the cppcheck options
let g:ale_cpp_cppcheck_options = get(g:, 'ale_cpp_cppcheck_options', '--enable=style')

call ale#linter#Define('cpp', {
\   'name': 'cppcheck',
\   'output_stream': 'both',
\   'executable': 'cppcheck',
\   'command': 'cppcheck -q --language=c++ '
\       . g:ale_cpp_cppcheck_options
\       . ' %t',
\   'callback': 'ale#handlers#HandleCppCheckFormat',
\})