2016-10-20 07:30:45 -04:00
|
|
|
" Author: Bart Libert <bart.libert@gmail.com>
|
|
|
|
" Description: cppcheck linter for c files
|
|
|
|
|
|
|
|
" Set this option to change the cppcheck options
|
2017-02-11 14:40:57 -05:00
|
|
|
let g:ale_c_cppcheck_options = get(g:, 'ale_c_cppcheck_options', '--enable=style')
|
2016-10-20 07:30:45 -04:00
|
|
|
|
|
|
|
call ale#linter#Define('c', {
|
|
|
|
\ 'name': 'cppcheck',
|
|
|
|
\ 'output_stream': 'both',
|
|
|
|
\ 'executable': 'cppcheck',
|
2017-02-11 14:40:57 -05:00
|
|
|
\ 'command': 'cppcheck -q --language=c '
|
|
|
|
\ . g:ale_c_cppcheck_options
|
|
|
|
\ . ' %t',
|
2016-10-20 07:30:45 -04:00
|
|
|
\ 'callback': 'ale#handlers#HandleCppCheckFormat',
|
|
|
|
\})
|